text box is diaplayed as <input tag on screen
Moderator: General Moderators
-
ranjita.damle
- Forum Newbie
- Posts: 5
- Joined: Wed Oct 08, 2008 5:12 am
text box is diaplayed as <input tag on screen
Entering "`" inside a text box and submitting a page, generating
<INPUT id=_ctl0_SearchFilter_SearchText value=` name=_ctl0:SearchFilter:SearchText>
on the screen onstead of a text box control.
Here the problem is with value = ` which should be "`"
but this code is getting called from many other places. and there it is not a issue.
From some pages, it is causing this problem.
Does anybody have any idea about this kind of issue?
<INPUT id=_ctl0_SearchFilter_SearchText value=` name=_ctl0:SearchFilter:SearchText>
on the screen onstead of a text box control.
Here the problem is with value = ` which should be "`"
but this code is getting called from many other places. and there it is not a issue.
From some pages, it is causing this problem.
Does anybody have any idea about this kind of issue?
Re: text box is diaplayed as <input tag on screen
Hi,
Use text box like this
<INPUT id="_ctl0_SearchFilter_SearchText" value="" name="_ctl0:SearchFilter:SearchText">
Regards,
Pravin
Use text box like this
<INPUT id="_ctl0_SearchFilter_SearchText" value="" name="_ctl0:SearchFilter:SearchText">
Regards,
Pravin
-
ranjita.damle
- Forum Newbie
- Posts: 5
- Joined: Wed Oct 08, 2008 5:12 am
Re: text box is diaplayed as <input tag on screen
No, i can't, this name and values are getting generated dynamically, with client side registration of each control. This means Text box name and values are generated on client side registration of a text box control.
Re: text box is diaplayed as <input tag on screen
You need to edit the generating code and apply quotes ('' or "").
-
ranjita.damle
- Forum Newbie
- Posts: 5
- Joined: Wed Oct 08, 2008 5:12 am
Re: text box is diaplayed as <input tag on screen
i tried appending " " to the generated value but then it shows the value with " " inside the text box. someting like "`" or "abc" inside a text box.
Re: text box is diaplayed as <input tag on screen
Can you please paste the generation code here.
-
ranjita.damle
- Forum Newbie
- Posts: 5
- Joined: Wed Oct 08, 2008 5:12 am
Re: text box is diaplayed as <input tag on screen
in the code generated, it doesnt show that control with the value, but on the screen, it shows this code as it is....
<INPUT id=_ctl0_SearchFilter_SearchText value=` name=_ctl0:SearchFilter:SearchText>
generated code i cant paste, since it is around 63 pages of word doc.
But the above line of code is getting displayed on the screen.
<INPUT id=_ctl0_SearchFilter_SearchText value=` name=_ctl0:SearchFilter:SearchText>
generated code i cant paste, since it is around 63 pages of word doc.
But the above line of code is getting displayed on the screen.
Last edited by ranjita.damle on Wed Oct 08, 2008 6:02 am, edited 1 time in total.
Re: text box is diaplayed as <input tag on screen
I mean the script used to generate this textbox.
-
ranjita.damle
- Forum Newbie
- Posts: 5
- Joined: Wed Oct 08, 2008 5:12 am
Re: text box is diaplayed as <input tag on screen
it is a normal control defined in HTML,
<asp:textbox id="SearchText" runat="server"></asp:textbox>
only its value is assigned on server side.
and it is working fiine for some other places. the same code gets called from around 20 places, among that 4-5 places this issue i am getting.
i am confused why it has different behavior.
<asp:textbox id="SearchText" runat="server"></asp:textbox>
only its value is assigned on server side.
and it is working fiine for some other places. the same code gets called from around 20 places, among that 4-5 places this issue i am getting.
i am confused why it has different behavior.
Re: text box is diaplayed as <input tag on screen
Proper XHTML should have all attribute values inside double or single quotes. If they're not, behaviour is not predictable.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.