p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   How To Type the text of html tag in TextBox (http://p2p.wrox.com/showthread.php?t=5781)

6cet6 November 4th, 2003 10:45 PM

How To Type the text of html tag in TextBox
 
hello,
if you type <img/> in the TextBox,
and submit it,
then the system will tell you there is a degarous behind,
so i want to know how to type the text of html tag in TextBox and submit the text to server correctly.
thank you!


life_s Ng November 5th, 2003 12:21 AM

hi, i suggest u to use parameters for ur sql statement,

dim MySQL2 as string= "INSERT INTO Visitors (Name, TimeIn) Values (@Name, @TimeIn)"
               dim objCmd2 as New OleDbCommand(MySQL2, Conn)

                with objCmd2.Parameters:
                                  .Add(New OleDbParameter("@Name", Request.Cookies("VisName").Value ))
                                  .Add(New OleDbParameter("@TimeIn", Request.Cookies("TimeIn").Value))

               end with

some thing like this. check this out for more infomation.
http://aspnet101.com/aspnet101/tutorials.aspx?id=1

Regards
life's Ng



planoie November 5th, 2003 10:53 AM

In Framework 1.1, they added input validate for ASP.Net page requests.

Add this to your ASPX @ Page directive:
    ValidateRequest="False"

http://msdn.microsoft.com/library/de.../cpconPage.asp

Peter
----------------------------------------
Work smarter, not harder.

6cet6 November 6th, 2003 05:30 AM

yes u are right!
thank you very much
i didn't sleep well these nights just for it!



All times are GMT -4. The time now is 04:29 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.