Is it possible to add a data from html control (input type=" text") to SQL if it is possible then how to do that?
add a value from html control to SQL
Collapse
X
-
Tags: None
-
Hi raghulvarma,
It sure is possible; if you have your html control inside a form, then when the form is submitted you can add the value of the control to your sql string. Like so:
Your form:
Your code that builds the sql string:Code:<form name="form1" action="mypage.asp" method="post"> <input type="text" name="txtTest" /> <input type="submit" value="Submit" /> </form>
Does this answer your question? Let me know.Code:<% Dim sSQL sSQL = "SELECT whatever FROM whereever WHERE something = '" & Request("txtTest") & "' " Response.Write sSQL %>
Dr B
Comment