.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

drop down list in modal popup problem

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net

i have a drop down list in modal popup extender.... modal popup appears on click of a link button which is inside grid view..

update panel is for entire grid view... problem is that other control's postback event is not getting fired because of drop downs in popup...when i comment the code for drop downs other links' on click event gets fired...but as soon as insert drop down code...click event is not fired...

what might be the solution...

any help??

View Complete Post

More Related Resource Links

Cascade Drop Down List Problem


I have 4 "cascade drop down linked" each other. The first one is "AccesoryFor", the second "TypeOfAccesory", the third "MarkOfAccesory" and the fourth "ModelOfAccesory".

The problem is that sometimes is possible in the web page I'm programming that a "Session Variable" could have a value that must be selected in one of that ddls. But not only that, the "ddl" or the entire "row" where the ddl is located ,must disappear. The problem is that, when the page does the rendering process, the others "cascade drop down" don't find its "control parents", so they stay disable and without data.

So, what I do in the Load Method:

 protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            Session["AccesoryFor"] = "cellphone";

 public void loadValuesToUI()
    if (Session["consultarRecursos_AccesorioDe"] != null)
            rowAccesoryFor.Visible = false;

As the row where the first DLL is located dissapears, and error occurs saying that "Control-Parents" are not found. There's no way to "Disable" or make dissapear the ddl in the web-service because

Drop Down List Selected Value problem ...



I created an Html Helper that renders 3 drop down lists (Day, Month and Year) for a field of type DateTime:

    public static MvcHtmlString Date(this HtmlHelper htmlHelper, String name, IEnumerable<SelectListItem> days, IEnumerable<SelectListItem> months, IEnumerable<SelectListItem> years, IDictionary<String, Object> htmlAttributes) {

      if (String.IsNullOrEmpty(name)) throw new ArgumentNullException("name", "Name cannot be null");

      StringBuilder fields = new StringBuilder();

      if (days != null)
        fields.Append(htmlHelper.DropDownList(String.Format("{0}.Day", name), days, String.Empty, htmlAttributes));

      if (months != null)
        fields.Append(htmlHelper.DropDownList(String.Format("{0}.Month", name), months, String.Empty, htmlAttributes));

      if (years != null)
        fields.Append(htmlHelper.DropDownList(String.Format("{0}.Year", name), years, String.Empty, htmlAttributes));

      return MvcHtmlString.Create(fields.ToString());     

    } // Date

And I have a DateFor extension:

    public static MvcHtmlString DateFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<S

How to use Cascading Drop Down in Modal Popup


I have several cascading drop down in my website which work fine. The problem is that i know need to use cascading drop down in a modal popup. The first list is populated but the subsequent lists are not being populated.

Please reply as to what i should do.

Problem with the modal popup within a asp updatepanel


Where is the Problem with the popup within a asp updatepanel.

It works fine in IE8. But in FireFox (Version 3.6.11) it works only sometimes.

ASP-Control for PopUp (PopUp.ascx):

<asp:UpdatePanel ID="UIUpdatePanel" runat="server" UpdateMode="Conditional">
			<div class="sectionheader">
				<asp:Label ID="UILabelHeadLine" runat="server" />
			<table class="exportPopupTable">
					<td style="width:200px;">
						<asp:RadioButton ID="UIRadioButton1" runat="server" Checked="true" />
					<td rowspan="6" class="helptextcolumn">
						<asp:Label ID="UILabelInfoText" runat="server" />
						<asp:RadioButton ID="UIRadioButton2" runat="server" />
					<td align="right" colspan="2">
						<asp:Button ID="UIButtonOk" runat="server" OnClick="UIButtonOk_Click" ValidationGroup="FinishDateTime" />
						<asp:Button ID="UIButtonCancel"

Modal Popup Extender and an Update Panel - "Cancel" Button problem


This should be a quick "yes" answer - I am in the process of creating a very simple test, but I thought I'd ask on here too (also, so other people might be able to find the answer, if they have the same problem).

I have created a modalpopupextender that opens up a panel containing an update panel.  I have a cancel button that is tied into the MPE's [CancelControlID] property and this closes the popup when I click it.  However, if I perform a partial postback within the update panel, the cancel button no longer works.  I have found an example online that seems to imply that the cancel button (and I'm guessing, by association) and the OK button should be outside the update panel.  Does the partial postback break the buttons' client script bindings, and thus should they always be placed outside the update panel?

Modal Popup Problem?



I m trying to open up a modal pop up dialog with a gridview inside. The problem is there is no pop up opens when i click the button. Here is the code below.

Any help would be great.

<asp:Button ID="Button1" runat="server" CausesValidation="False" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1"
PopupControlID="GridView1" BackgroundCssClass="modalBackground" DropShadow="true" />
<br />
<asp:GridView ID="GridView1" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False"
<asp:ButtonField ButtonType="Button" Text="Select" />
<asp:BoundField DataField="Lifnr" HeaderText="Lifnr" SortExpression="Lifnr" />

Modal Popup Extender postback problem?



When i try to submit the page which has modal popup extender,popup extender becomes visible! How can i avoid this?

Thanks in advance.

Treeview expand problem in modal popup in firefox


Hello All,

I am using ASP.NET 2.0, i have one form in which on click of button, one modal popup opens in which one treeview is there but when i click on the plus sign of tree's node, nothing is being happened, instead plus sign becomes an image and can be pulled over the form also. This problem is not in Internet Explorer 7. But in FireFox and Google Chrome the same problem is there and this problem is only with tree placed in modal pop up.

Help me if anyone has any solutions.

Thanks in advance


Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

Way of adding items in Drop Down List or List Box using Javascript

The article Way of adding items in Drop Down List or List Box using Javascript was added by raja.s on Sunday, June 06, 2010.

Hi,script type="text/javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); // Add an Option object to Drop Down/List Box document.getElementById("DropDownList"

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

Problem when displaying a popup window

Hi all,
I am working on a project in which when I clicked a hyperlink a pop up window has to be displayed for 2 pages.
But at first when i did this in javascript it worked, later after i finished the whole coding suddenly an error box displayed that there is an error in webpage and want to debug

want to launch modal Popup from created User Event handler




I have a create user wizard on my page and in the event handler (Created User) I get extra information from the user

via textboxes within the aspx etc.


I then do a response.redirect to another page.

What I want to happen is this


When the CreatedUser Event is fired, I  want a Modal Popup to show up with a message Processing your registration.

once the registration code is processed it will close and the users get redirected.


On my ASPX I have the Modal PopUp and a Panel.

In the code behind in the handler I put ModalPop.show()


but this does not work.


thanks for any suggestions



How to use a drop down list to edit in the standard Edit.aspx with DD?


Hey All,

I'm brand new to Dynamic Data and to ASP.NET.  I've been able to fumble around and get the calendar extender up and running and a few other customization options implemented, but I can't seem to get this drop down list to work - even after reading tons of online info.  The good news is that my web page/application is VERY simple, so hopefully you guys can help me out.  I'm working in VB btw.

I have a list of road projects submitted to me by local governments.  One of the fields is SponsoringAgency, which has a limited number of possible entries (the names of member governments).  Thus, when they submit a new project, or edit an existing one, I want to limit the input into the field "SponsoringAgency." I'm trying to use a dropdownlist because I'm familiar with it from Access, but it may not be the best approach.  Imagine you just setup a brand new, standard DD website, how would you get this to work?

Methods tried and failed (probably because I don't understand them fully):

UIHint - The closest I can get with this is an error saying that since SponsoringAgency isn't a Foreign Key, I'm out of luck.

Creating a SponsoringAgency Table - In my data layer, I created a second table with a list of government names.  I then tried se

FormView Text Field Being Set by A Drop Down List


Hello, I have a FormView which is used to insert a record into a database.  Outside of this formview i have a drop down list, I want to grab the value from that drop down list and set one of the text fields within the formview to it's currently selected value.  I've tried the following code, but the dynamic categorytextbox line is what seems to not be working.

                    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
DataSourceID="SqlDataSourceCategory" DataTextField="CategoryName"
DataValueField="CategoryID" Width="200px">

                            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
Text='<%# Bind("CategoryID") %>' Visible="False" />

        protected void FormView1_DataBound(object sender, EventArgs e)
dynamic varCategory = ddlCategory.SelectedValue;
dynamic categoryTextBox = FormView1.FindControl("CategoryIDText

Modal Popup disappears after showing in IE7


Currently having problems with a modal popup. When you click its target control it will show up the hide itself again.  Thanks. Will try to add some more details later.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend