Textbox type="tel" empty after autopostback

Hi there...

I have a textbox with HTML5 type="tel" placed on an updatepanel.
On the panel is also a DropDownlist with an AutoPostback on change. After autopostback, the value in the textbox is gone....

The (stripped) code:

        <asp:UpdatePanel runat="server" ID="up">
          <ContentTemplate>
<asp:TextBox runat="server" type="tel" ID="txtTel"></asp:TextBox>
<asp:DropDownList runat="server" ID="ddlCities" OnSelectedIndexChanged="checkOptions" AutoPostBack="True" />
        </ContentTemplate>
      </asp:UpdatePanel>

If I change type="tel" to type="text", the problem is gone.

Any ideas? Thanks!
x-bender-xAsked:
Who is Participating?
 
x-bender-xConnect With a Mentor Author Commented:
(.....)

Then here the code copied from the-site-which-name-I-shall-not-tell:

"You may want to leave "type" undeclared in your code "front". You can set this in the code behind (maybe in the Page_Init or Page_Load):"

this.Contract.Attributes.Add("type", "tel");

Open in new window

0
 
COBOLdinosaurCommented:
Which browser?  Please post the rendered HTML.

Cd&
0
 
Johny BravoCommented:
You can simly use an input element

Here is an example

<input type="tel" id="YourId" runat="server" />
0
 
x-bender-xAuthor Commented:
...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.