|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
use varible value in include filebelow is the seperate include file called CommonVarValue.aspx <% Dim dcnid as integer dcnid = 67 %> then another aspx file has sqlDataSource section whose selectCommand needs to use dcnid value, the code is like below, anyone knows what is correct format to use the value? <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM table1 where id = dcnid "> </asp:SqlDataSource> Thanks =?Utf-8?B?bWFydGluMQ==?= <mart***@discussions.microsoft.com> wrote in
news:C7CEC9D7-FFEF-47A9-975F-B0015C0DDEA8@microsoft.com: Create a shared (static) class and store all your values in there.> then another aspx file has sqlDataSource section whose selectCommand > needs to use dcnid value, the code is like below, anyone knows what is > correct format to use the value? Alternatively you can store values in your app.config/web.config too (in the appsettings section). Hi, Spam,
could you give sample to store value in web.config appsettings section? Thanks Show quoteHide quote "Spam Catcher" wrote: > =?Utf-8?B?bWFydGluMQ==?= <mart***@discussions.microsoft.com> wrote in > news:C7CEC9D7-FFEF-47A9-975F-B0015C0DDEA8@microsoft.com: > > > then another aspx file has sqlDataSource section whose selectCommand > > needs to use dcnid value, the code is like below, anyone knows what is > > correct format to use the value? > > Create a shared (static) class and store all your values in there. > > Alternatively you can store values in your app.config/web.config too (in > the appsettings section). > =?Utf-8?B?bWFydGluMQ==?= <mart***@discussions.microsoft.com> wrote in
news:28D32142-61DB-4459-9306-95B2EF802740@microsoft.com: Take a look at the System.Configuration.ConfigurationManager classes (.NET > could you give sample to store value in web.config appsettings section? > 2.0). ConfigurationSettings in .NET 1.1. Thank you! Spam,
I figure out Show quoteHide quote "Spam Catcher" wrote: > =?Utf-8?B?bWFydGluMQ==?= <mart***@discussions.microsoft.com> wrote in > news:28D32142-61DB-4459-9306-95B2EF802740@microsoft.com: > > > could you give sample to store value in web.config appsettings section? > > > > Take a look at the System.Configuration.ConfigurationManager classes (.NET > 2.0). > > ConfigurationSettings in .NET 1.1. > |
|||||||||||||||||||||||