This is a discussion on "Get Enviroment Variables in HTML page" within the ASP.NET Forum section. This forum, and the thread "Get Enviroment Variables in HTML page are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Get Enviroment Variables in HTML page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Get Enviroment Variables in HTML page
I have my ConnectionString in my web.config file and can access it through my code behing page easy enought,
Public oSQL AsNew OleDb.OleDbConnection(ConfigurationSettings.AppSet tings("SQLconn")) but I can't access through the HTML page. I obviously don't want to bring my connectionstring into the HTML code. Thanks for any assistance, Bob |
|
|
|
||||
|
Re: Get Enviroment Variables in HTML page
Quote:
An HTML page will not be able to access your app settings simply because it's an HTML page
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
Re: Get Enviroment Variables in HTML page
Thats what I was trying to find out. is there a place I should store Connectionstrings when working in HTML?
|
|
||||
|
Re: Get Enviroment Variables in HTML page
I still don't get you....
Why would an HTML page need a connection string.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
Re: Get Enviroment Variables in HTML page
OK, I'll start from the begining. I have a testbox where an account number is entered. On the 10th character I want to go to the database and get that account's info like the name and address. I couldn't find a way in the code-back page to track how many characters have been entered in a textbox, so I am tracking it in the HTML page using vbscript. And because this is in the HTML page, I don't want to but see no other way, to put the password infomation for the connectionstring in my code? I am looking for other ways to accomplish this.
|
|
|||
|
Re: Get Enviroment Variables in HTML page
Use another page. Instead of using a textbox to pick the account number, use an input, that way you can control the "onkeypress" event. Then you can use a javascript function that counts teh characters that the user has entered. When the count reaches to 10, redirect the page to another one and send the account number as a parameter. Thus you can control the database connectivity and query on the page_load event in the new page and then show the info you'd like.
Greetings... |
![]() |
| Tags |
| enviroment, variables, html, page |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pull Variables into a form without page refresh | Andy K | Classic ASP | 3 | Apr 11th, 2008 16:29 |
| Linking to an html page | rusty149 | Web Page Design | 1 | Feb 4th, 2008 10:34 |
| Securing test enviroment | Spartan0510 | PHP Forum | 6 | Nov 15th, 2007 15:51 |
| Passing Variables to a require_once() Page | darryladie | PHP Forum | 3 | Jun 20th, 2006 18:36 |
| URL variables aren't seen by destination page | GraffitiGuy | PHP Forum | 2 | Apr 13th, 2005 13:34 |