Nov 03, 2009, 8:06 AM
Set value inline
I need to set an AJAX parameter inline. I tried a few things but no luck.
I want to click a button then refresh the form data with query string value as ID. What is the proper way to to that?
Value="#this.memberID"
Value="#memberID"
Value="#{memberID}"
ie...I want to click a button then refresh the form data with query string value as ID. What is the proper way to to that?
<ext:Button ID="btnRefresh" runat="server" Text="Refresh" Icon="ArrowRefresh">
<AjaxEvents>
<Click OnEvent="Refresh" Buffer="250">
<EventMask ShowMask="true" MinDelay="250" Msg="Refreshing..." />
<ExtraParams>
<ext:Parameter Name="memberID" Value="#{memberID}" />
</ExtraParams>
</Click>
</AjaxEvents>
</ext:Button>
public static int memberID = 0;
protected void Page_Load(object sender, EventArgs e)
{
try { memberID = Convert.ToInt16(Request.QueryString["memberID"]); } catch { }
}
protected void Refresh(object sender, AjaxEventArgs e)
{
string memberID = e.ExtraParams["memberID"];
...
}