AlHal2
asked on
Set sqldatasource at run time
The below asp code sets an sqldatasource.
I want the the program to look at C:\InetPub\wwwroot\web.con fig and set the connection string based upon what it finds there. In other words the parameter ConnectionStrings:DS2DSSQL ConnStr won't be set until the program has checked C:\InetPub\wwwroot\web.con fig
What's the best way to do this?
I want the the program to look at C:\InetPub\wwwroot\web.con
What's the best way to do this?
<asp:SqlDataSource ID="sdsSchemas" runat="server" ConnectionString="<%$ ConnectionStrings:DS2DSSQLConnStr %>"
SelectCommand="RO_SelectEquityCSchema" SelectCommandType="StoredProcedure"
UpdateCommand="RO_UpdateCSchema" UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:SessionParameter Name="rtrExchangeCode" SessionField="RTRExch" />
<asp:SessionParameter Name="rtrInstrumentTypeCode" SessionField="RTRitc" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="FileNameCode" Type="String" />
<asp:Parameter Name="Required" Type="String" />
<asp:Parameter Name="rc" Type="int16" Direction="output" />
</UpdateParameters>
</asp:SqlDataSource>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER