Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

using updatepanel and enabling texbox if ispostback

$
0
0

Hi. I have only a TextBox and a DropDownlist on aspx-file. TextBox enabled property is false by default. Texbox is in the UpdatePanel. And also I'm using MasterPage, but TextBox and DropDownlist aren't on the MasterPage. 

 protected void Page_Load(object sender, EventArgs e)
    {

        if (IsPostBack && DropDownList1.SelectedIndex != 0)
        {
            tbAuto.Enabled = true;
            Button2.Enabled = true;
        }



    }

Using this code. I'm not only getting a textbox with enabled true, but also the same textbox with enabled false which was by default.

How to solve it?

Can you please also explain me, why is it so? 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>