0
Response.Redirect(my site's url + "editques/" + "QuesID/" + QuesID + "/" );

Redirecting as shown above...In the editques.aspx page, whenI debug, I see the Query String's value as {QuesID=jhgjgjhjk&PID=jhhkjkj}

Where on earth did this PID came from!??

4
  • Is it possible that the PID is added by some rewriting rule of yours? Commented Nov 29, 2010 at 11:37
  • You might aswell ask why it's showing the FAQID. My guess is that there is some url rewriting taking place that adds it. Commented Nov 29, 2010 at 11:38
  • Its QuesID only..I typed FAQ by mistake..it was a typo Commented Nov 29, 2010 at 11:48
  • {QuesID=jhgjgjhjk&PID=jhhkjkj} is what I see when I debug..typed FAQ by mistake..sry Commented Nov 29, 2010 at 11:50

3 Answers 3

1

There must be some component that needs to persist a value between postbacks and is using the query string for that purpose.

Update: Are you by any chance displaying paginated data on the page? PID might stand for page id and might be generated by the component that is handling paging.

Sign up to request clarification or add additional context in comments.

2 Comments

yeah it is paginated..Displaying records in telerik's RadGrid..So what do i need to do now?
I believe that the telerik's component needs that query string parameter in order to work properly. PID will probably disappear if you disable pagination on the grid. It might also have an option to store that param in the Session. Is there any reason why you want that parameter removed from the query string? If not, you should probably leave it in there.
1
var c = new HttpValueCollection(); 
c.Add(HttpUtility.ParseQueryString(Request.Url.Query)); 

if (!string.IsNullOrEmpty(c["PID"])) 
    c.Remove("PID"); 

Comments

0

Are you sure you aren't redirecting before this line or after this line?

I don't even see the FAQID in that Qstring..

4 Comments

Try Response.Redirect(Proj2.Constants.SiteURL + "editques/" + "QuesID/" + QuesID + "/" + QuesTypeID,true);
{QuesID=jhgjgjhjk&PID=jhhkjkj} is what I see when I debug..typed FAQ by mistake..sry
Can you try: Response.Redirect(Proj2.Constants.SiteURL + "?QuesID=" + QuesID + "&QuesTypeID=" + QuesTypeID,true);
I tried what u said, its still showing PID in the Query string

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.