Forms Doubt

P

Phill. W

Renjith said:
Hi

how to set data to html from textbox from an asp page

renjith

Something like this ?

[me.asp]
<html>
<body>
<form name='frmMain' action='./me.asp' method='post'>
<%
Dim sOne : sOne = Request.Form( "txtOne" )

If sOne <> "" Then
Response.Write "<p>Value is <b>" _
& Server.HTMLEncode( sOne ) _
& "</b></p>"
End If

Response.Write "<p><input " _
& "type='input' " _
& "name='txtOne' " _
& "value='" & sOne & "' " _
& "size='20' " _
& "></p>"
Response.Write "<p><input " _
& "type='submit' " _
& "name='submit' " _
& "></p>"
%>
</form>
</body>
</html>

HTH,
Phill W.
 
R

Renjith

Hi Phill

Sorry , the question i gave was wrong....

"how to set data to html form textbox from an asp page"

Like after validation of the form i have to show "Invalid User" in the HTML
file , from the asp file , where validation is done.

Renjith

Phill. W said:
Renjith said:
Hi

how to set data to html from textbox from an asp page

renjith

Something like this ?

[me.asp]
<html>
<body>
<form name='frmMain' action='./me.asp' method='post'>
<%
Dim sOne : sOne = Request.Form( "txtOne" )

If sOne <> "" Then
Response.Write "<p>Value is <b>" _
& Server.HTMLEncode( sOne ) _
& "</b></p>"
End If

Response.Write "<p><input " _
& "type='input' " _
& "name='txtOne' " _
& "value='" & sOne & "' " _
& "size='20' " _
& "></p>"
Response.Write "<p><input " _
& "type='submit' " _
& "name='submit' " _
& "></p>"
%>
</form>
</body>
</html>

HTH,
Phill W.
 
P

Phill. W

Renjith,

It's not all /that/ different.
Here's my code revised to allow just "Yes", "No" and "Maybe"
in the textbox ...

[me.asp]
<html>
<body>
<form name='frmMain' action='./me.asp' method='post'>
<%
Dim sOne : sOne = Request.Form( "txtOne" )

Response.Write "<p><input " _
& "type='input' " _
& "name='txtOne' " _
& "value='" & sOne & "' " _
& "size='20' " _
& "> "
Select Case UCase( sOne )
Case "YES", "NO", "MAYBE"
Case Else
Response.Write "INVALID - must be Yes, No or Maybe"
End Select
Response.Write "</p>"

Response.Write "<p><input " _
& "type='submit' " _
& "name='submit' " _
& "></p>"
%>
</form>
</body>
</html>

Renjith said:
Hi Phill

Sorry , the question i gave was wrong....

"how to set data to html form textbox from an asp page"

Like after validation of the form i have to show "Invalid User" in the HTML
file , from the asp file , where validation is done.

Renjith

Phill. W said:
Renjith said:
Hi

how to set data to html from textbox from an asp page

renjith

Something like this ?

[me.asp]
<html>
<body>
<form name='frmMain' action='./me.asp' method='post'>
<%
Dim sOne : sOne = Request.Form( "txtOne" )

If sOne <> "" Then
Response.Write "<p>Value is <b>" _
& Server.HTMLEncode( sOne ) _
& "</b></p>"
End If

Response.Write "<p><input " _
& "type='input' " _
& "name='txtOne' " _
& "value='" & sOne & "' " _
& "size='20' " _
& "></p>"
Response.Write "<p><input " _
& "type='submit' " _
& "name='submit' " _
& "></p>"
%>
</form>
</body>
</html>

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top