ASP.NET object tab index - asp.net

I use VS2010,C# to develop ASP.NET web app, I have some two text boxes, two buttons and a checkbox in one of my pages, but I want one of my text boxes to have initial focus when page loads, so that cursors blinks in this text box and when users presses keys, this text box receives keys, I've changed tab index of my controls so that the desired text box has tab index = 0, but still no luck, what should I do?

Ideally tabIndex property should work. If not then you can manually set the focus by writing a small piece of javascript/jQuery code. For more : How do you automatically set the focus to a textbox when a web page loads?

Related

Add custom dynamic text box in asp.net zero angular

I am working in asp.net zero with angular, wants to add dynamic text box.
I wants to add custom text box in angular asp.net zero. When i click on button then two text box will be show on screen. If i click again on button then show new two text box on the screen. and i can delete it too.
Any one have idea, how to do it.
This is not specific feature on asp.net zero, is angular, the best way i can suggest you do it is using angular reactive form. follow this tutorial and you will have all the features

Looking for a vb.net code to add existing buttons/text boxes/drop down lists, etc. to a container, or holder?

I'm using vb.net. Basically, I have a drop down list, text box and a submit button. You choose a movie director from a drop down list, then type in a movie, click button and it adds the data to my database.
There's another button which hides/shows drop down list, text box and submit button using Visible = True and Visible = False, but what I don't like about it is when it hides the things I said before, it leaves some white/empty space like if they are still there, but not visible.
Is there anyway to put some kind of holder/container and place a button which when clicked could add my drop down list, text box and submit buttons to that place?
Cheers,
E.N.
I assume that you are working with WinForms in Visual Studio. In the Toolbox the controls which could help you out of this situation are in the "Containers" section. Among others, there is a Panel, a FlowLayoutPanel and a TableLayoutPanel (see this video on msdn for a TableLayoutPanel Demo). They can help you to organize controls. Especially the FlowLayoutPanel places the controls automatically. But you can always change the Top and the Left properties of any control, to move them around to the desired place or group some of them on a Panel and change the Location of this one one.
You can add a control to a container by using the Add method of its Controls property. However, if the control is already on the form (since you are asking how to add an existing control) you must remove it from the form before.
Me.Controls.Remove(myButton)
panel1.Controls.Add(myButton)

What is the proper name for a multibutton?

I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.

Using the Tab key to navigate form inputs

I am having some problems with tabbing within my asp.net pages. This project was developed with Visual Studio 2008.
Case 1
I have two html tables. The first table has two rows; the second table has four rows. Within the cells are of each table are asp.net fields, text boxes and radio button lists. I set focus to the first field of table one. I then press the tab key multiple times. The focus moves through the field of table one and then through the fields in the first row of the table two. Then instead of goes to the second row of the table two it return to the table one.
But if I set focus to the last cell on the first row of table two, it tabs through the remaining cells of table two properly. Can you tell me how to get the tabbing to behave properly and go to the cells in there natural order? Note that I am setting the tab index property in the order that I want.
Case 2
On another page I have an html table with a single row followed by a gridview control. The gridview control is writeable and has the following columns: Check Box, Radio Button List, Text Box, Text Box, Text Box and a Check Box List. If I click on one of Check Box, Radio Button List or Check Box List., then press tab, the cursor pops out of the grid and sets focus on the first field of the table outside the grid. But if I set focus on one of the text boxes and tab; then the tab goes through the fields of the grid left to right one row at a time. This later behavior is what I want in both cases. I don’t know why my cursor pops out of the grid when I start with a field other than a text box.
Please help if you can.
Bob
funny, you explain in details your case but you didn't explain what it needs to be explained in order to someone can understand you :)
first of all, is table1 located in the first tab and table2 in second tab?
what do you used for tabs: asp.net tab control, jquery ui tabs...?
what do you mean by 'press the tab key multiple times'? same tab? do you have postback on tab click? what is the focus in your case, and so on and on...
cheers
Have you checked the order of the input elements in your HTML? Generally the tab order follows the order of controls.
If that all looks right, then make sure nothing is setting the TabIndex property - as this will also mess up the tab order.
I pretty much resolve this and I wanted to add the answer for anyone who viewed this thread. The problem was the autpostback on certain fields. Once I disabled autopostback, the problems went away.
Bob
You need to use Javascript and I referred for your a very good example of navigating through Gridview rows with Up/Down keys.
http://www.codeproject.com/Articles/25675/GridView-Rows-Navigation-Using-Arrow-Up-Down-Keys

sharepoint calendar messing up accessibility mode tab order

on any OOB sharepoint page, if you "tab" through the page, the first tab brings up a "turn on more accessible mode" menu item. that is, except for a page with a calendar web part. Once you tab off the browser menu, the first tab item becomes the calendar web part, skipping over the menu item and all other content.
I've tried setting tab index to -1, 0, 1 on the div with the menu that I want hit first, but the calendar web part still gets the first tab, forcing users who tab through pages to have to cycle through all controls to get to the "accessible mode" menu.
Any ideas what else I could do to make sure this loads as the first item tabbed to, no matter what?
Thanks in advance!
try using JQuery, to remove (or edit) the tabindex of the table holding the calendar webpart. It probably has a tabindex 0 , that occurs later in the code then the accessible mode div, and the browser will see 2 items with tabindex 0, the startindex (-1 doesn't work) for the tab button. Seeing 2 items, it will use the last item found in the html as the start for the tab button.

Resources