Click here to Skip to main content
15,903,854 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I am using Query String For Sending ItemsID from one page to another page.

First Page :- Query String For Sending ID :-

ASP.NET
<asp:LinkButton ID="lnkbtnGetDetails" runat="server" Text="Details" PostBackUrl='<%#"ItemsDescriptionDetails.aspx?ItemsID="+Eval("Prod_Sub_Cat_Items_Desc_ID") %>' >



Second Page : Using Query String ID

C#
int id;

protectd void Page_Load(object sender, EventArgs e)
{
 if (Request.QueryString["ItemsID"] != null)
      
  { 
        id = Convert.ToInt32(Request.QueryString["ItemsID"]);
        FetchItemsDescription(); // Method Name for fetching records using query string ID
        }
        else
        {
        Response.Redirect("Home.aspx");
        }
}



Using query string when i am navigating first page to second page then using query string i display data in seond page......but when i am clicking back button on second page....then it's not redirecting to first page it's showing some error like (Confirm Form Resubmission
This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed. Press Reload to resend that data and display this page.)


Pl'z suggest me, how can i solve it.............
Posted
Updated 5-Dec-12 19:32pm
v2

if u are using link button then use

XML
<asp:LinkButton ID="submit" runat="server" Text="Submit" OnClientClick="javascript:transfer('<%=Jobid%>')"></asp:LinkButton>


<script language="javascript">
function transfer(opt)
{
window.open("/pagename.aspx?jobid="+opt,'Title','width=200,height=100')
}
</script>



Others ways to send values from one page to another page.

Transferring page values to another page[^]
 
Share this answer
 
Comments
Sumit_Kumar_Sinha 6-Dec-12 1:42am    
any other way to solve this one............
Patel Shailendra 6-Dec-12 1:44am    
which way u want to navigate on another page on link button click event or any else.
Sumit_Kumar_Sinha 6-Dec-12 1:48am    
using PostBackURL
Patel Shailendra 6-Dec-12 2:00am    
visit here You will get postbackurl way to send value form one page to another page

http://ramanisandeep.net/2008/11/21/passing-values-from-one-page-to-another-page-aspnet/
Patel Shailendra 6-Dec-12 2:02am    
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.postbackurl.aspx
i think you try another browser for this, because your code is right, and your data is also display well in next page,
remove other java script which you use in that page, because it also resion of error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900