On Apr 2, 11:56 pm, "jobs" <j...@webdos.comwrote:
<form action="mypage.aspx" method="post">
<input type="text" name="search" value="whatever" />
<input type="submit" value="search" />
</form>
Thanks for that.. thinking about how this will work and what the
impact might be.
the hyperlink is inside a gridview on content page. The form, is on
the master page and will control many pages and controls. I'm not sure
how I would even set the id search to whatever from the gridview.
thank you.
Well, what about a LinkButton Control instead of normal hyperlink?
The LinkButton posts the web form back.
in the grid
<asp:LinkButton
ID="Button1"
CommandArgument="whatever"
Text="Search">
runat="server" />
in the code-behind
protected void EditContent(object sender, CommandEventArgs e)
{
//e.g. use Session
Session["search"] = e.CommandArgument.ToString();
Response.Redirect("~/mypage.aspx");
}
OR there is also another way to use the PostBackUrl property
<asp:LinkButton ID="Button1"
PostBackUrl="~/mypage.aspx"
runat="server"
Text="Search" />
to pass the value:
http://msdn2.microsoft.com/en-us/lib...39(VS.80).aspx