Hii.
In my project, in the main page, I've a ASPxPageControl and ASPxPopupControl. In the ASPxPopUpControl, I've a form consits of two radio buttons and so many text fields and combo boxes etc. In the ASPxPageControl, there are two tabs.
The PopUpElement of ASPxPopupControl is in the second tab. And on the PageLoad(), I've configured to display the first tab.
I want to enable/disable texbox in the form according to the user selection of the radio button. But, when AutoPostBack is enabled, the entire page is refreshed, and the default tab will be the first one. And to resume the form, i've to manually click the second tab and the ASPxPopupControl will open automatically.
Is there anyway to resolve this?? Is there any other control other than radio button to do this?(Which accepts client side scripting)
Firstly, Do you need to postback to enable/disable textboxes? you have rich ClientSide Events for Textboxes to enable/disable/hide them (SetVisible, SetEnabled).
Secondly, you can have your second Tab Content in an AspxCallbackPanel, and when Radio Button changes, you Can do a CallbackPanel Refresh (PerformCallback). Thus, only the Tab Content will update.
Related
I have multiple usercontrols in my home.aspx page.In the Header.ascx I have button imgbtnCreateAccount,On Click of this button modal popup appears on screen.
Now apart from this I have Product search User control ProductSearch.ascx.I am retrieving data from database for both the usercontrols. In producdtsearch.ascx page I have label, textbox and submit button.
If I leave textbox blank and press enter,it gives me required field validator which is fine,but when I type something in textbox and press enter it gives me modal popup which should not happen.It appears for all the other usercontrols which is textboxes in it.I have tried adding default button to the panel in which modal popup appears,but still nogo.Also tried changing the text property of imgbtnCreateAccount,still no go.
I also tried to set tetbox property to autopostback=true,but what haapens is that, the background of modal popup blinks for a second and then goes off. Modal popup should only appear on click of imgbtnCreateAccont which is Header.ascx page and nwhile entering tect in any of the textboxes of other usercontrols.Kindly suggest the resolution.
Issue got resolved as i added panel and inside the panel i have div which contains table.there is button in table.i have set the default button property of panel to this button name and the issue got resolved.
I am using a GridView with its first column as a template field with radio buttons.
I need to make the first radio button in the first row of the grid remain default selected during page load / postback.
How can this be done?
Read this:
http://www.asp.net/data-access/tutorials/adding-a-gridview-column-of-radio-buttons-vb
The heading titled "Using a Literal Control to Inject Radio Button Markup" may be of particular interest to you
if i have multiple submit buttons and the user enters some text in a textbox and presses enter. How can i specify which button event i want to fire?
You can specify for an asp.net Panel the id of button in the property DefaultButton. So, you need to group the controls into panels and then you can specify the default button for any of them. Also, you can specify a default button for the whole page - in the form tag.
I have a listbox which acts as a list of items. If you click on some item, it's contents are shown in the panel on the right (few textboxes etc.).
I need to have a validation on these controls as all of them are required fields. And I do have it. The problem is that, even when the validators are not valid, user can click the listbox and change active index (that doesn't have impact on the panel on the right, as SelectedIndexChanged isn't fired).
The validators are standard RequiredFieldValidator with their Display property set to "Dynamic". So, what I want is to disallow the user clicking on the listbox and changing the index untill all validators are Valid.
What would be your solution for that? Is that even possible?
Did you try setting ListBox.Enabled = false when you actually do fire off the SelectedIndexChanged, and reenabling when your required fields meet the Page.IsValid requirement to proceed in code execution?
There is a tab menu which was created by asp.net control. Now I'm changing this with a new tab menu I made with javascript. There is an event on third tab and when i click the tab it's posting back with asp.net ajax as asyn. but it takes me to the first tab after postingback every time but I don't want to change the tab after this. it must be stay on the third tab just must be changed content that's all. How do I solve it?
thank you
If your home-made tabset is in the update panel, then it will be part of the partial update. Your tab control needs to remember it's viewstate so that when it is rendered after a postback (or partial update) it will render with the right selected tab. I suggest using a hidden field on the page that holds the value or index of the selected tab. Then, when you go to render the tabset from a postback, you read from that hidden field and know what tab is selected and render as such.