text box is diaplayed as <input tag on screen

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
ranjita.damle
Forum Newbie
Posts: 5
Joined: Wed Oct 08, 2008 5:12 am

text box is diaplayed as <input tag on screen

Post by ranjita.damle »

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?
adroit
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2008 1:25 am
Location: India
Contact:

Re: text box is diaplayed as <input tag on screen

Post by adroit »

Hi,

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

Post by ranjita.damle »

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.
adroit
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2008 1:25 am
Location: India
Contact:

Re: text box is diaplayed as <input tag on screen

Post by adroit »

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

Post by ranjita.damle »

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.
adroit
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2008 1:25 am
Location: India
Contact:

Re: text box is diaplayed as <input tag on screen

Post by adroit »

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

Post by ranjita.damle »

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.
Last edited by ranjita.damle on Wed Oct 08, 2008 6:02 am, edited 1 time in total.
adroit
Forum Commoner
Posts: 37
Joined: Fri Aug 08, 2008 1:25 am
Location: India
Contact:

Re: text box is diaplayed as <input tag on screen

Post by adroit »

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

Post by ranjita.damle »

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.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: text box is diaplayed as <input tag on screen

Post by pickle »

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.
Post Reply