c# - Update ASP:Parameter with Value from URL Parameter -
i able collect url parameter , pass through selectparameter.
i thought work may wrong in approach of translating code code behind display level
<asp:gridview id="countrygridview" runat="server" autogeneratecolumns="false" cssclass="mgrid" onrowediting="countrygridview_rowediting"> <columns> <asp:boundfield readonly="true" datafield="i_sk_accom" headertext="i_sk_accom" visible="false" /> <asp:boundfield readonly="true" datafield="accom_code" headertext="accom code" /> <asp:boundfield readonly="true" datafield="accom_name" headertext="accom name" /> <asp:boundfield datafield="op49_required" headertext="op49 required?" /> <asp:boundfield datafield="weekly" headertext="weekly" /> <asp:boundfield datafield="daily" headertext="daily" /> <asp:commandfield showeditbutton="true" buttontype="image" editimageurl="~/images/edit.gif" updateimageurl="~/images/save.png" cancelimageurl="~/images/cancel.png" controlstyle-cssclass="imagebutton" /> </columns> </asp:gridview> <asp:sqldatasource id="get_country" runat="server" connectionstring="<%$ connectionstrings:jfaadmin %>" selectcommand="iface_jfa_accom" selectcommandtype="storedprocedure" updatecommand="iface_jfa_accom" updatecommandtype="storedprocedure" > <selectparameters> <asp:parameter direction="input" name="statement" type="string" defaultvalue="countrygridselect" /> <asp:parameter direction="input" name="i_fk_countryid" type="string" defaultvalue="request["i_fk_countryid"].trim().tostring()" /> </selectparameters> </asp:sqldatasource>
the request["i_fk_countryid"].trim().tostring() url parameter im trying capture pass through i_fk_countryid parameter
thanks help.
marcus
you can utilize querystringparameter this:
<asp:querystringparameter name="i_fk_countryid" type="string" querystringfield="i_fk_countryid" />
c# asp.net visual-studio
No comments:
Post a Comment