A few questions

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Question 1
How do I set focus on a textbox (System.Web.UI.WebControls.TextBox)?

---

Question 2
Suppose I have three pairs of textbox and button in my form.

[ text1 ] [button1] | [ text2 ] [button2] | [ text3 ] [button3]

I'd like to make button1 the default button if the user has the cursor on
text1. Likewise, if the user is on text2, I want button2 to be the default
button. How do I do this?

---

Question 3
Is there a text centering attribute for System.Web.UI.WebControls.Label?


Thank you!
 
HI Ed,
Question 1
How do I set focus on a textbox (System.Web.UI.WebControls.TextBox)?

For this one I have an answer I think you can use this on the second also.

<INPUT tabindex="1" id="fieldid" type="text" size="27">

//This should be the last rows in your html aspx file

<script language="JavaScript">
fieldid.focus();
</script>
</HTML>

I have still not succeeded doing this in VB
(It has to be the last operation in a page load on client side)

I hope this helps a little bit?

Cor
 
Thanks, but I was hoping for a member function such as:

TextBox1.SetFocus()

Is there any thing like that available?
 
The very least you could have done is implement your questionaire in a
webform page using VB.NET.

Most of your questions are closed ended so i'd suggest radio
buttons/and combo boxes for the bulk of the them.... but even then it
would have been better off in the ASP.net news group.

So "C'mon" cause this a vb.net language newsgroup.... at least try to
make your posts even vaguely relevant.

hth
Richard
 
Back
Top