PDA

View Full Version : multiple _dc entries



whelaro
Aug 08, 2012, 3:59 PM
We were able to get the FormPanel working, however I'm not sure why we're getting multiple _dc entries with each completion.

Some context: the FormPanel is used as a modal popup in a way similar to a javascript alert. With each form submission, it will generate that popup.

here is an example of how the url functions:

initial load:
---http://www.site.com/whatever.aspx?param1=val&param2=val

first save:
---http://www.site.com/whatever.aspx?param1=newval&param2=newval&_dc=1234567890&param3=nextitem&param4=nextitemid

second save:
---http://www.site.com/whatever.aspx?param1=newval&param2=newval&_dc=1234567890&param3=newerval&param4=newerval&_dc=123456791

third save:
---http://www.site.com/whatever.aspx?param1=newval&param2=newval&_dc=1234567890&_dc=123456791&param3=newerval&param4=newerval&_dc1234567892

etc. etc. (adds the new _dc's at the end, original params (dictating type of form) start the string, shifting all the previous _dc query string values to follow that, the newest params (IDing the next record to pull up) follow that, and ending with the new _dc).

At some point, it appears that the string is becoming too long and when it attempts to load the FormPanel, it returns a error 400 (bad request) ext.net dialog with the form being a webform of the asp.net uncaught exception screen.

Is there a way to prevent the previous _dc entries (ones at the beginning of the query string) from rendering?

Thanks,

Edit: misrepresented the string.

whelaro
Aug 10, 2012, 4:48 PM
I attempted to find something related to disableCache (apparently 1.x it is NoCache and 2.x it is disableCache), but the NoCaching didn't assist.

However, I put this in the Page_Load event and it worked fine (note that we're not using the control in a AJAX-y manner. It generates a full postback):


var paramList = HttpUtility.ParseQueryString(HttpContext.Current.R equest.QueryString.ToString());
if (!string.IsNullOrEmpty(paramList["_dc"]))
{
paramList.Remove("_dc");
Response.Redirect(HttpContext.Current.Request.Path + "?" + paramList, false);
}