473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

use varible value in include file

Hi, All

below 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
Aug 31 '06 #1
4 1137
=?Utf-8?B?bWFydGluMQ==?= <ma*****@discussions.microsoft.comwrote in
news:C7**********************************@microsof t.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).
Aug 31 '06 #2
Hi, Spam,

could you give sample to store value in web.config appsettings section?

Thanks

"Spam Catcher" wrote:
=?Utf-8?B?bWFydGluMQ==?= <ma*****@discussions.microsoft.comwrote in
news:C7**********************************@microsof t.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).
Aug 31 '06 #3
=?Utf-8?B?bWFydGluMQ==?= <ma*****@discussions.microsoft.comwrote in
news:28**********************************@microsof t.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.
Aug 31 '06 #4
Thank you! Spam,

I figure out

"Spam Catcher" wrote:
=?Utf-8?B?bWFydGluMQ==?= <ma*****@discussions.microsoft.comwrote in
news:28**********************************@microsof t.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.
Sep 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jack | last post by:
Hello, Under is C procedure: #include<stdio.h> #include<conio.h> void ab(int x) { if(x<5) { ab(x+1); printf("%d ",x);
0
by: farooq | last post by:
Hi guys, I’m facing some problem can u solve it. Problem is: I’m giving user Id and password in (Login_sess.asp) and submit it to page (sess_test.asp). I am setting session variable...
1
by: Marce | last post by:
Hi, I have a DTS which has a connection, 3 destination text files and a Process execution job which runs a simple batch file to concatenate this 3 files into a 4th text file "Endeud.txt". I added...
4
by: Xero | last post by:
Hello. I am using vb.net. There are two forms in my project. One is 'base' and the other one is 'savecurrent'. There is a value stored in a textbox called 'qc_a' in 'base'. I want to inherit...
23
by: paul | last post by:
HI! How so get the name of the present page into a variable? I need it because I need to attach it to a path so I can make others link to me. My pages are in iframes. Paul
2
by: Aido82 | last post by:
Hi, this is probably a stupid question. Im trying to declare a varible to have the value of that in a text box when i declare the varible is there a way to give it the value in a text box...
3
by: gr8graphix | last post by:
My skills are basic at best, but I can normally edit existing codes to suite my needs and someday hope to be good at it (any good coaches out there?)... Any way, I am working on this piece of code...
1
by: anniefs | last post by:
hi help me i m so much stuck int he code and i have no time .... i used ASP VBscipt and javascript functions with MS database javascript function add records in MS DB by using ASP vbscript...
3
by: Sachin | last post by:
Hi Folks, I have one query in regarding const varible interpretaion by C/C++ compiler. How Compiler actually differentiate between normal stack varible and const varible during program execution?...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.