Click here to Skip to main content
15,356,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 <asp:DataGrid ID="dgv" runat="server"></asp:DataGrid>

        <asp:SqlDataSource id="roreleaseorder"  runat="server" ConnectionString =
"Data Source=server2005;Initial Catalog=databasename;User Id=userid;Password=password;Integrated Security=False"  SelectCommand ="SELECT NO AS REFNO,DATE,RONO,RODT,CLIENT,FDATE,TDATE,AMOUNT FROM RO07_08  where condintion? ORDER BY DATE,CLIENT"></asp:SqlDataSource> 
        
        <asp:DataGrid id="dg" GridLines= "Both" runat ="server"   AutoGenerateColumns ="false" DataSourceID  ="roreleaseorder" >
        <HeaderStyle Font-Bold="true" ForeColor="#E7E7FF" BackColor="#4A3C8C" Font-Names="Verdana, Arial, Helvetica" font-Size="12px"></HeaderStyle>	
        <Columns>                  
          <asp:HyperLinkColumn DataNavigateUrlField ="refno" HeaderText="Refno" DataNavigateUrlFormatString="./scheduling.aspx?refno={0}" Target="_self"></asp:HyperLinkColumn> 
          <asp:BoundColumn DataField="date" HeaderText="Date" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="rono" HeaderText="rono" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="rodt" HeaderText="rodate" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="client" HeaderText="Agency/Client" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="fdate" HeaderText="From Date" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="tdate" HeaderText="To Date" ReadOnly ="true" ></asp:BoundColumn>
          <asp:BoundColumn DataField="amount" HeaderText="Amount" ReadOnly ="true" ></asp:BoundColumn>                   
        </Columns>     
                </asp:DataGrid> 


SelectCommand ="SELECT NO AS REFNO,DATE,RONO,RODT,CLIENT,FDATE,TDATE,AMOUNT FROM RO07_08  where condintion? ORDER BY DATE,CLIENT"
How to pass parameter in runtime?


How to pass parameter in runtime?</
Posted
Updated 23-Dec-09 23:07pm
v2

1 solution

I deleted your duplicate question. Once is enough to ask something.

The SqlDataSource stuff is hideous. It's not fit for use in commercial applications. Instead, you should write a proper data layer, which will support accepting paramaters to search and filter the data.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900