Saturday, 15 September 2012

c# - Add parameter in SqlDataSource from code-behind -



c# - Add parameter in SqlDataSource from code-behind -

i have grid on page want fill info provided stored procedure has parameter read cookie. don't know how can add together parameter sqldatasource dynamically , assign grid?

</telerik:radscriptmanager> <telerik:radajaxpanel id="radajaxpanel1" runat="server" height="200px" width="715px"> <telerik:radgrid id="radgrid1" runat="server" allowpaging="true" allowsorting="true" cellspacing="0" gridlines="none" height="533px" pagesize="7" allowfilteringbycolumn="true" filteritemstyle-width="400px" datasourceid="dsnew"> <clientsettings> <selecting cellselectionmode="none" /> <scrolling allowscroll="true" usestaticheaders="true" /> </clientsettings> <alternatingitemstyle backcolor="#cccccc" /> <mastertableview datasourceid="dsnew"> <commanditemsettings exporttopdftext="export pdf" /> <rowindicatorcolumn filtercontrolalttext="filter rowindicator column" visible="true"> </rowindicatorcolumn> <expandcollapsecolumn filtercontrolalttext="filter expandcolumn column" visible="true"> </expandcollapsecolumn> <editformsettings> <editcolumn filtercontrolalttext="filter editcommandcolumn column"> </editcolumn> </editformsettings> </mastertableview> <filteritemstyle width="400px" /> <filtermenu enableimagesprites="false"> </filtermenu> </telerik:radgrid> <asp:sqldatasource id="dsnew" runat="server" connectionstring="<%$ connectionstrings:db_banksafedepositboxesconnectionstring %>" selectcommand="s_boxes_statusreport" selectcommandtype="storedprocedure"> <selectparameters> <asp:cookieparameter name="branchid" cookiename="userauth" /> </selectparameters> </asp:sqldatasource>

you can utilize follows:-

<selectparameters> <asp:cookieparameter name="email" cookiename="email_id" /> </selectparameters>

msdn link http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.cookieparameter.aspx

c# asp.net

No comments:

Post a Comment