Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Forms Doubt

Reply
Thread Tools

Forms Doubt

 
 
Renjith
Guest
Posts: n/a
 
      06-22-2005
Hi

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

renjith
 
Reply With Quote
 
 
 
 
Phill. W
Guest
Posts: n/a
 
      06-22-2005
"Renjith" <> wrote in message
news:FC941FE9-E0D8-4A62-9EC3-...
> 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.


 
Reply With Quote
 
 
 
 
Renjith
Guest
Posts: n/a
 
      06-22-2005
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" wrote:

> "Renjith" <> wrote in message
> news:FC941FE9-E0D8-4A62-9EC3-...
> > 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.
>
>
>

 
Reply With Quote
 
Phill. W
Guest
Posts: n/a
 
      06-22-2005
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" <> wrote in message
news:784FD070-F114-4FCC-937E-...
> 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" wrote:
>
> > "Renjith" <> wrote in message
> > news:FC941FE9-E0D8-4A62-9EC3-...
> > > 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.
> >
> >
> >



 
Reply With Quote
 
Ken Jenkins
Guest
Posts: n/a
 
      06-22-2005
http://www.powerasp.com/content/hintstips/asp-forms.asp

"Renjith" <> wrote in message
news:FC941FE9-E0D8-4A62-9EC3-...
> Hi
>
> how to set data to html from textbox from an asp page
>
> renjith



 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dotnet doubt can any body clarify my doubt challa462@gmail.com ASP .Net 0 08-22-2012 06:02 AM
doubt about doubt Bob Nelson C Programming 11 07-30-2006 08:17 PM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Forms Doubt Renjith ASP General 1 06-30-2005 06:42 AM
Doubt in Forms authentication configuration settings Naveen Kumar ASP .Net Security 1 04-05-2005 05:20 PM



Advertisments
 



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 44 45 46 47 48 49 50 51 52 53 54 55 56 57