Do not want to use text form <input type="text" name="T1" size="20"> example: thmlcode="<a href=""page1.html"">Page</a>" I want to use hidden form < input type"hidden" value="<%=thmlcode%>" name="h1" > question: why replace "<" and ">" are not working? thmlcode=replace(replace((thmlcode),">",">"),"<","<") when use <% response.write thmlcode %> please help Thanks, Regards,
I think that the reason is input's value="<%=thmlcode%>" is init before the code thmlcode=replace(replace((thmlcode),">",">"),"<","<") to be executed. My advice is: 1. add runat="server" for the input: < input type"hidden" runat="server" id="_ID1" name="h1" > 2. in Page_Load add _ID1.value = replace(replace((thmlcode),">",">"),"<","<") (you may also check for PostBack as well)
thanks tihomir_wwf it helps An hour ago I also just found out <textarea> form can easy help to list the html code. I was wrong to use <input type="text" > form. Regards,