ASP.NET Text box control

If i place 2 text boxes on a form and compile it will run.. With out entering data in the first text box i can enter in to another.. What i need is i don't want the cursor to go to the next text box if i left it as blank... How can i ro this in ASP or vb.Net

Questions by Dorababu.Meka

Showing Answers 1 - 6 of 6 Answers

Here is Simple Solutions:

Environment: VS 2005
Application: ASP.Net
Language: C#

I added two textbox controls namely TBox1 and TBox2.
Initially
Set TBox1 Property AutoPostback=True.
set TBox2 property Enabled=False.

Goto TBox1_TextChanged event
here is  code:

protected void TBox1_TextChanged(object sender, EventArgs e)
    {
        if (TBox1.Text.ToString() == "")
        {
            TBox2.Enabled =false;
        }
        else
        {
            TBox2.Enabled =true;
        }
    }

---------------------------------------------------------------------------------------------
Above said information is asper my knowledge.


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions