I have an asp grid view which contains a text box and button.I have set a required field validator for the text box .But on clicking the button the required field validator doesn't shows up for the text box for the button i clicked(when the textbox is empty).Is there anyway to show the validator for text box based on the button i clicked?
also when i click on the button the command which is set for the button executes even when the text box is empty.
also i have place the item template in update panel so that the page does not refereshes.
Related
i have a main view with a combo box and its controller, and a second view which gets loaded when a button is clicked on the main view.
the second view contains a button and a label and has its different controller.
what i want to do is, when the button on the second controller is clicked, the selected item on the combo box on the main view should be displayed on the label..
so that when i go back and change the item on the combo box and go back and click the button on the second view ,the text on the label would be changed to the currently selected item.
any help..???
thanks
How can i get the values of dynamically created text boxes that i have reload every time a user adds a new text box?
Right now what I have is a form with a few text boxes, and an add button, now when the a user clicks add button, it creates another section with a few more text boxes, but now if the user had typed something in one of the text boxes before he clicked add, how can i store that information and make sure it comes back up when the page reloads?
Thank you,
I was trying to use radio button control in asp.net but I'm experiencing a problem that, the label of the radio button is getting displayed under the radio button. I want to use it in front of the radio button. Is there any property of a radio button with which the label can be displayed in front of the radio button.?
It might be because the text that you add is long or space for total control is less so the text is getting wrapped. Try giving some large fixed width to the control. It would be better if you post some code.
I have added three text box with three Buttons, I want that when enter first text box, event fire of first button as well as when enter on second text box, event fire of second button as on..
But facing the problem that this all in user control, and when enter in first text box, event fire of first button, and when enter second or third text box also event fired of first button.
I have added java script and Jquery function on key-press event of textbox(key == 13) But these functions not making check in user control.
You can user jquery change method or focusin
$('#firsttxtbox').change(function() {
alert('First textbox's text changed');
});
i have an form in which i have radiolist and set of text boxes and dropdownlist.now when i check an radio some textboxes will be disabled and some text box will be enabled .now i want to validate only the enabled text box and not the disabled one.
in the same manner when i check other radiobutton i want to validate the rest of the text boxes.can some body help please.
some one give me the validation code for that.
If you can use jQuery then you can get the enabled text boxes using
$("input[type='text']:disabled")
and the enabled text boxes using
$("input[type='text']:not(:disabled))
If you want to use simple javascript then you can get all the textboxes, then iterate through them, check the type attribute for text and check the disabled attribute to true or false.