Skip to content

Javascript Button click Issue

prasanth kanna

Asked Jun 30, 2014, 5:14 AM EDT1 answer
Share
LinkedInX
Hi Gurus,
 
 Please find the code below:
 
Default.aspx
 
 
 Default2.aspx
 



























 
 
1) I am redirecting from Default.aspx page with querystring,It looks like this:

eg: http://localhost/Default2.aspx?CustomerId=1&ItemId=1

2)In Default2.aspx,I have buttons 1 to 10 (pasted above).

3)If i click on those button,it should attach to the querystring in the url:

eg: http://localhost/Default2.aspx?CustomerId=1&ItemId=1&Page=1

4) But now my issue is : if i click on 1st button - url changes to

eg: http://localhost/Default2.aspx?Page=1

5) i wanted the url like

http://localhost/Default2.aspx?CustomerId=1&ItemId=1&Page=1

and the page number should change based on the button clicked.

How to achieve this. Please help me with this.



Thanks in Advance. 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hey,

    Try to change this value at server side at submit in code behind, e.g., 

    lnk1.PostBackUrl = "~/Default2.aspx?CustomerId=1&ItemId=1"

    Thnx
    0