开发者

Problem while inserting html control in my database in Asp.Net

开发者 https://www.devze.com 2023-03-08 14:15 出处:网络
My problem is that I\'m inserting HTML control using Server.HtmlEncode() method <a href=\'\'>A开发者_开发知识库pply now!</a> in my database through text box but whenever I\'m inserting it

My problem is that I'm inserting HTML control using Server.HtmlEncode() method <a href=''>A开发者_开发知识库pply now!</a> in my database through text box but whenever I'm inserting it throws an exception.

My Code is Here

textbox1.text=Server.Server.HtmlEncode("`<a href=''>Apply now!</a>`");

//Database entry

obj.html=textbox1.text;


You can either try to change

Server.Server.HtmlEncode(

to

Server.HtmlEncode(

or tell us more about what kind of exception you're getting, how do you update database etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消