Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > .NET

Reply
 
LinkBack Thread Tools
Old December 1st, 2005, 08:24 AM   #1
New Member
 

Join Date: Nov 2005
Age: 41
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 bwalker is on a distinguished road
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
bwalker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 11:15 AM   #2
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
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 - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 12:10 PM   #3
New Member
 

Join Date: Nov 2005
Age: 41
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 bwalker is on a distinguished road
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?
bwalker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 1st, 2005, 12:15 PM   #4
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: Get Enviroment Variables in HTML page

I still don't get you....

Why would an HTML page need a connection string.
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old December 2nd, 2005, 09:10 AM   #5
New Member
 

Join Date: Nov 2005
Age: 41
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 bwalker is on a distinguished road
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.
bwalker is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 5th, 2006, 12:45 AM   #6
WebForumz Member
 

Join Date: Aug 2006
Location: Peru
Age: 23
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 QuikFrozen is on a distinguished road
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...
QuikFrozen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
enviroment , variables , html , page


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 April 11th, 2008 12:29 PM
Linking to an html page rusty149 HTML, XHTML and CSS 1 February 4th, 2008 06:34 AM
Securing test enviroment Spartan0510 PHP 6 November 15th, 2007 11:51 AM
Passing Variables to a require_once() Page darryladie PHP 3 June 20th, 2006 02:36 PM
URL variables aren't seen by destination page GraffitiGuy PHP 2 April 13th, 2005 09:34 AM


Search Engine Optimization by vBSEO 3.2.0 RC8