Get Enviroment Variables in HTML page

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 1st, 2005, 12:24
New Member
Join Date: Nov 2005
Age: 39
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote

  #2 (permalink)  
Old Dec 1st, 2005, 15:15
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Get Enviroment Variables in HTML page

Quote:
Originally Posted by bwalker
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
You are not really making yourself clear.

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
Reply With Quote
  #3 (permalink)  
Old Dec 1st, 2005, 16:10
New Member
Join Date: Nov 2005
Age: 39
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #4 (permalink)  
Old Dec 1st, 2005, 16:15
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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
Reply With Quote
  #5 (permalink)  
Old Dec 2nd, 2005, 13:10
New Member
Join Date: Nov 2005
Age: 39
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #6 (permalink)  
Old Aug 5th, 2006, 04:45
Up'n'Coming Member
Join Date: Aug 2006
Location: Peru
Age: 21
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
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...
Reply With Quote
Reply

Tags
enviroment, variables, html, page

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 20:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43