clientTarget problem

V

Valmir

When I use a text box web control like this

<asp:textbox id="txtCustomerName" runat="server" MaxLength="50"
Width="471px">

and set clientTarget to blank, I got the following source code

IE 6: <input name="txtCustomerName" type="text" maxlength="50"
id="txtCustomerName" style="width:471px;" /></td>

Mozzila/Firefox: <input name="txtCustomerName" type="text"
maxlength="50" id="txtCustomerName" />

The lack of style tag causes text box length to not be the same in
both
browsers. I've googled a little and found some tips pointing to change
web.config's <clientTarget> section and add the keys:

<add alias="ne7" userAgent="Mozilla/5.0 (Windows; U; Windows NT 5.0;
en-US; rv:1.7.3) Gecko/20040910"/>
<add alias="firefox" userAgent="Mozilla/5.0 (Windows; U; Windows NT
5.0; en-US; rv:1.7.5)">

I did it and still got no sucess. Setting clientTarget to "ne7" or
"firefox" causes the wrong rendering even in IE 6. I've tryied a
little trick putting the code in codebehind:

txtCustomerName.Style.Add("width","471px");

for each control. It causes a lot of work and complex to maintain and
got success in both browsers, and I'm sure this is not the right
way. Certainly I'm doing something stupid. Could someone help me?

Thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top