RE: Simple Variable Passing between HTML and ASP
From: Vishnu-Chivukula (VishnuChivukula_at_discussions.microsoft.com)
Date: 02/21/05
- Next message: William F. Robertson, Jr.: "Re: Application restart on file change"
- Previous message: Alvin Bruney [MVP]: "Re: Application restart on file change"
- In reply to: John Baker: "Simple Variable Passing between HTML and ASP"
- Next in thread: John Baker: "Re: Simple Variable Passing between HTML and ASP"
- Reply: John Baker: "Re: Simple Variable Passing between HTML and ASP"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Feb 2005 06:47:09 -0800
Hi John,
Not too sure what problems you ran into.
> I have an HTML Text Box which I have
> named HireInput, and a table (Access Table in fact) that has on it a field called >HIREID. I wish to select records where the two match! It sounds simple, but I >am having trouble
> setting up the text box name so that it is recognized in the query.
There are a couple of whays to solve this...
One is by using a simple Select Query and the other is by using a Stored
procedure.
In case you want to go with the Query way,
"Select Column1, Column2, Column3 from TableName Where HIREID ='" +
TextBox1.Text + '"
This should be fine..
***Remember, This is not a recomemded way as this code is subject to SQL
Injection. ***
The other way is to write a a stored procedure and Pass the textBox1.Text
value as an input. To Avoid SQL Injection dont directly send the textbox
value to the SP. But use SQL Parameters...
Hope this Helps...
Need any help, Do post a msg back...
Happy Coding
"John Baker" wrote:
> Hi:7
>
> Newby here to ASP, and using the ASP.NET Web Matrix development tool. While that tool
> looks great for a Newby, I have run into a snag. I have an HTML Text Box which I have
> named HireInput, and a table (Access Table in fact) that has on it a field called HIREID.
> I wish to select records where the two match! It sounds simple, but I am having trouble
> setting up the text box name so that it is recognized in the query.
>
> Can someone tell me the simple way to do this?
>
> Thanks
>
> John Baker
>
- Next message: William F. Robertson, Jr.: "Re: Application restart on file change"
- Previous message: Alvin Bruney [MVP]: "Re: Application restart on file change"
- In reply to: John Baker: "Simple Variable Passing between HTML and ASP"
- Next in thread: John Baker: "Re: Simple Variable Passing between HTML and ASP"
- Reply: John Baker: "Re: Simple Variable Passing between HTML and ASP"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|