I redirect to a page from a grid view by sending the message id with it. this is done in client side
<asp:ImageButton ID="imgbtn_ViewDashBoard" ImageUrl="Styles/Images/dash.jpg" Enabled="True"
Width="" runat="server" PostBackUrl='<%# Eval("MsgID", "ResponseMetric.aspx?MsgID={0}") %>'
Text='Send' ToolTip="View DashBoard"></asp:ImageButton>
How can I do this in server side. I have a button on the page, when the button is clicked it has to redirect to responsemetric.aspx page with the msgID. I want to pass the msgid with the URL from server side, how to do that. thanks
protected void ViewDash_Click(object sender, EventArgs e)
{
int msgid = Convert.ToInt32(Session["uNewmsgID"].ToString());
}
Not exactly postback but if you are passing your parameter in the query string, this should work.