Click here to Skip to main content
15,878,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello sir.
I have two pages, a.aspx and b.aspx.
I have 4 buttons in a.aspx. Each button has different functionality.
When we press any button of the 4 buttons, the page should navigate to only b.aspx and perform their functionality.

I used postbackurl property for all 4 buttons.
How to detect in b.aspx, that the request comes from which button?
If anybody knows, please help me.
Posted
Updated 8-Nov-10 23:18pm
v2

1 solution

<asp:Button ID="Button1" runat="server" Text="Button" PostBackUrl="~/GridView.aspx?btn1=one" />

In b.aspx page
C#
protected void Page_Load(object sender, EventArgs e)
{
if(Request.QueryString["btn1"] == "one")
 {
     //your code
    // Response.Write(&quot;test&quot;);
 }
}
 
Share this answer
 
v2
Comments
thatraja 9-Nov-10 5:42am    
[Comment from OP][Moved from Answer]
thank you sir.
thankyou for your quick reply. thankyou very much.

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