Aligning .aspx buttons - asp.net

I have an update panel that contains a label, a dropDownList and two buttons:
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="dropDownList" style="position:relative;" runat="server">
<label>
Select New File: </label>
<div id="ddl" runat="server">
<asp:DropDownList runat="server" ID="ddlCaseFiles" DataSourceID="dsMyCaseFiles" DataTextField="Display"
DataValueField="FileID" OnPreRender="ddl_PreRender" Width="524px" OnSelectedIndexChanged="ddlCaseFiles_SelectedIndexChanged" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlCaseFiles"
ToolTip="Casefile Required" InitialValue="-1" Text="*" Display="Dynamic" />
<ajaxToolkit:ListSearchExtender ID="ddlExtCaseFiles" runat="server" PromptCssClass="ListSearchExtenderPrompt"
TargetControlID="ddlCaseFiles" BehaviorID="ddlExtCaseFiles" Enabled="True" />
</div>
<br />
<asp:Button ID="btnMoveCaseFile" runat="server" Text=""
style="float:left;" onclick="btnMoveCaseFile_Click"/>
<asp:Button ID="btnCancel" runat="server" Text="Cancel"
style="float:right" onclick="btnCancel_Click"/>
<br />
</div>
<asp:Label runat="server" ID="lblStatus"></asp:Label>
</ContentTemplate>
I am trying to get my buttons to line up like this:(button at the beginning of the DropDownList and a button at the End)
I've tried float-absolute etc.

I figured it out. Seems as though you have to add in px after the number.....
<asp:Button ID="btnMoveCaseFile" runat="server" Text=""
style="position:absolute; float:left; margin-left:104px;" onclick="btnMoveCaseFile_Click"/>
<asp:Button ID="btnCancel" runat="server" Text="Cancel"
style="position:relative; float:right; margin-right:63px;"
since I had margin-right:63; instead of margin-right:63px;

Related

List items disappear after postback

I am having lots of problems with my dropdownlist. My dropdownlist controls disappear after postback.
The idea is that if in the drop down list I choose Spain, the ddlProvincia control shows the Spanish provinces. However, if I choose any country other than Spain, I should show the textbox "tbProvinciaNombre".
The problem is that when I select a country in the "ddlPais" control the list items of this control and "ddlProvincia" disappear completely.
Any help is welcome.
Thank you.
<asp:UpdatePanel ID="upProvinciaNombre" runat="server" UpdateMode="Conditional" class="col-md-6 form-group">
<ContentTemplate>
<!-- Provincia -->
<div id="panelDdlProvincia" runat="server" visible="true">
<asp:Label runat="server" AssociatedControlID="ddlProvincia">Provincia</asp:Label><span class="requerido">*</span>
<asp:DropDownList ID="ddlProvincia" runat="server" CssClass="form-control selectpicker" />
<asp:RequiredFieldValidator ID="rfvddlProvincia" runat="server" ErrorMessage="Seleccione una opción" CssClass="invalid-feedback" Text="*" InitialValue="none" ControlToValidate="ddlProvincia" ValidationGroup="ValidationButton"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="vceRfvddlProvincia" runat="server" TargetControlID="rfvddlProvincia" HighlightCssClass="error" CssClass="oculto" />
</div>
<!-- Provincia Nombre -->
<div id="panelTbProvinciaNombre" runat="server" visible="false">
<asp:Label runat="server" ID="lbProvinciaNombre" AssociatedControlID="tbProvinciaNombre">Provincia</asp:Label><span class="requerido">*</span>
<asp:TextBox ID="tbProvinciaNombre" runat="server" CssClass="form-control"></asp:TextBox>
<div>
<asp:RequiredFieldValidator ID="rfvTbProvinciaNombre" runat="server" CssClass="invalid-feedback" ControlToValidate="tbProvinciaNombre" Display="Dynamic" ValidationGroup="ValidationButton" ErrorMessage="Introduzca una provincia válida" />
<ajax:ValidatorCalloutExtender ID="vceRfvTbProvinciaNombre" runat="server" TargetControlID="rfvTbProvinciaNombre" HighlightCssClass="error" CssClass="oculto" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<!-- Pais -->
<asp:UpdatePanel ID="upPais" runat="server" UpdateMode="Conditional" class="col-md-6 form-group">
<ContentTemplate>
<asp:Label runat="server" AssociatedControlID="ddlPais">Pais</asp:Label><span class="requerido">*</span>
<asp:DropDownList ID="ddlPais" runat="server" CssClass="form-control selectpicker" AutoPostBack="true" />
<asp:RequiredFieldValidator ID="rfvddlPais" runat="server" ErrorMessage="Seleccione una opción" CssClass="invalid-feedback" Text="*" InitialValue="none" ControlToValidate="ddlPais" ValidationGroup="ValidationButton"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="vceRfvddlPais" runat="server" TargetControlID="rfvddlPais" HighlightCssClass="error" CssClass="oculto" />
</ContentTemplate>
</asp:UpdatePanel>
<!-- Políticas -->
<div class="col-md-12 form-group">
<div class="checkbox">
<asp:CheckBox ID="cbPoliticas" runat="server" />
<asp:Label runat="server" ID="politicas" AssociatedControlID="cbPoliticas">He leído y acepto la
<asp:HyperLink ID="hlkPoliticaPrivacidad" runat="server" Target="_blank" NavigateUrl="~/contenidos/privacidad.aspx" Text="política de privacidad" />
y el
<asp:HyperLink ID="hlkAvisoLegal" runat="server" Target="_blank" NavigateUrl="~/contenidos/avisoLegal.aspx" Text="aviso legal" />
del sitio web.
</asp:Label>
<div>
<asp:TextBox ID="tbFakeCv" runat="server" CssClass="oculto" />
<asp:CustomValidator runat="server" ID="cvCbPoliticas" ErrorMessage="Es obligatorio aceptar la política de privacidad" CssClass="error" Display="Dynamic" ControlToValidate="tbFakeCv" ValidateEmptyText="true" ValidationGroup="ValidationButton" />
<ajax:ValidatorCalloutExtender ID="vceCvCbPoliticas" runat="server" TargetControlID="cvCbPoliticas" HighlightCssClass="error" CssClass="oculto" />
</div>
</div>
</div>
The solution was really simple. In my case, I was using the class "selectpicker", but I assumed that this functionality was implemented in the .js file. But no, It was missing. Just add the following code in the .js file and everything is working like a charm.
Sorry. I just want to comment it because sometimes the frontend and backend are responsible of different people, and a error in one part could be a pain in the ass to the other member of the team.
// Selectpicker
if ($.fn.selectpicker) {
$('.selectpicker:not(.jQ_todos)').selectpicker();
$('.selectpicker.jQ_todos').selectpicker({ noneSelectedText: 'Todos' });
}

ASP Modal Popup appears behind gridview after 3 clicks

I have a page with multiple modal popups and a gridview. If i open the popups 3 times the grid goes infront of the popup. I am pretty sure it has somethign to do witht eh update panels but i am stumped.
Here is the Code
<asp:UpdatePanel ID="NewCustCarUP" runat="server">
<ContentTemplate>
<asp:button ID="NewCustButton" runat="server" CssClass="btn btn btn-success" text="Add Customer" OnClick="NewCustButton_Click"/>
<asp:button ID="NewCarButton" runat="server" CssClass="btn btn btn-primary" text="Add Carrier" OnClick="NewCarButton_Click"/>
<!-- MP ADD CUST -->
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="mpAddCust" runat="server" PopupControlID="NewCustPanel" TargetControlID="lnkFake"
CancelControlID="btnClose" BackgroundCssClass="modalBackground" RepositionMode="RepositionOnWindowResizeAndScroll">
</cc1:ModalPopupExtender>
<asp:Panel ID="NewCustPanel" runat="server" CssClass="modalPopup" style = "display: none; width:65%; height:90%; overflow:scroll; ">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4"><br />
<asp:Button ID="newCustInsert" runat="server" UseSubmitBehavior="false" OnClick="newCustInsert_Click" CssClass="btn btn-success" ValidationGroup="NewCust" Text="Add Customer" />
<asp:Button ID="btnClose" runat="server" Text="Close" CssClass="btn btn-danger" />
</div>
<div class="col-sm-4 col-md-4 col-lg-4"></div>
</div>
</asp:Panel>
<!-- END MP ADD CUST -->
<!-- MP ADD CARRIER -->
<asp:LinkButton ID="lnkFake1" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="mpAddCar" runat="server" PopupControlID="NewCarPanel" TargetControlID="lnkFake1"
CancelControlID="btnCloseCar" BackgroundCssClass="modalBackground" RepositionMode="RepositionOnWindowResizeAndScroll">
</cc1:ModalPopupExtender>
<asp:Panel ID="NewCarPanel" runat="server" CssClass="modalPopup" style = "display: none; width:65%; height:90%; overflow:scroll; ">
<div class="row">
<div class="col-sm-4">
.....Code with textboxes</div>
<div class="col-sm-4">
<asp:Button ID="InsertCarBtn" runat="server" Text="Add Carrier" CssClass="btn btn-success" OnClick="InsertCarBtn_Click" ValidationGroup="NewCar" />
<asp:Button ID="btnCloseCar" runat="server" Text="Close" CssClass="btn btn-danger" />
</div>
<div class="col-sm-4 col-md-4 col-lg-4"></div>
</div>
</asp:Panel>
<!-- END MP ADD CARRIER -->
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="MPStatusUP" runat="server">
<ContentTemplate>
<asp:panel ID="StatusPanel" runat="server" CssClass="modalPopup" style="z-index: 10000; position: relative;" >
<div class="row">
<div class="col-sm-4">
....Content
</div>
<div class="col-sm-4">
<asp:button ID="StatusbtnUpdate" runat="server" Text="Update" CssClass="btn btn-success" OnClick="StatusbtnUpdate_Click" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn btn-danger" OnClientClick = "return Hidepopup()"/>
</div>
<div class="col-sm-4 col-md-4 col-lg-4"></div>
</div>
</asp:panel>
<asp:LinkButton ID="lnkFake3" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="StatusMP" runat="server" DropShadow="false"
PopupControlID="StatusPanel" TargetControlID = "lnkFake3"
BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="Gridview1UP" runat="server" ChildrenAsTriggers="true"
UpdateMode="Conditional">
<ContentTemplate>
<asp:gridview ID="GridView1" runat="server"
DataSourceID="ActiveLoadsSQL" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="0px" Width="100%"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDataBound="GridView1_RowDataBound"
DataKeyNames="LoadID" AllowSorting="true" AllowPaging="true" Font-Size="Smaller" CssClass="table table-hover"
pagesize="25">
<Columns>
<asp:TemplateField HeaderText="loadID" InsertVisible="False" SortExpression="loadID">
<ItemTemplate>
<asp:Label ID="loadIDLabel" runat="server" Text='<%# Bind("loadID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<asp:Button ID="UpdateStatusModalbtn" OnClick="UpdateStatusModalbtn_Click" runat="server" CommandName="select" CssClass="btn btn-info btn-xs" text="Update"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle VerticalAlign="Top" />
</asp:gridview>
</ContentTemplate>
</asp:UpdatePanel>
It all works great until i get i click on a button 3 times on the status modal inside the GV and 4 times on the Add Customer and carrier outside of the GV. Thanks for your help!!
Fixed with this post
AJAX ModalPopup Pops Behind (Under) Page Content (Negative z-index)
.ModalPopup
{
z-index: 6001 !important;
}
.ModalPopupBackground
{
z-index: 6000 !important;
}

how to dynamically assign id to controls - controls are inside datalist in asp .net

I am using datalist for showing datas. Datas are test questions with 4 options.I have 50 questions displaying in datalist.
By using ItemDataBound event - i am making visible only one question with 4 options to user. Remaining questions are invisible . In the Itemdatabound event - i am assigning id to the radio buttons. but also id is not assigned to the datalist ,it showing different id.
<div class="widget">
<div class="widget-header" align="center" style="background: #4a98c9; color: #FFFFFF;">
<h4>
<asp:Label ID="Label5" runat="server" Text="Question : "></asp:Label>
<asp:Label ID="lblQuestionNo" runat="server" Text="0 of 0"></asp:Label></h4>
<asp:HiddenField ID="HdCurrentQuestSlNo" runat="server" />
<asp:HiddenField ID="HdfMinTime" runat="server" />
<asp:HiddenField ID="HdfSecTime" runat="server" />
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:HiddenField ID="HdfQSlNo" runat="server" />
<asp:HiddenField ID="HdQuestCount" runat="server" Value="0"/>
</div>
<div class="widget-content">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="PanelQuestBlock" runat="server" ScrollBars="Vertical" Width="100%" Height="325px">
<asp:DataList runat="server" ID="DataListQuestion"
onitemdatabound="DataListQuestion_ItemDataBound"
onitemcreated="DataListQuestion_ItemCreated">
<ItemTemplate>
<div class="questdisplayId" id="divQuestBlock" runat="server">
<div>
<asp:HiddenField ID='HdSlNo' runat="server" Value='<%# Eval("SlNo") %>' ClientIDMode="Static"/>
<asp:HiddenField ID="HdUserQuestId" runat="server" Value='<%# Eval("UserQuestionId") %>' ClientIDMode="Static"/>
<asp:HiddenField ID="HdTotalOptions" runat="server" Value='<%# Eval("TotalOptions") %>' ClientIDMode="Static"/>
<asp:HiddenField ID="HdQuestAnsweredTimeSecs" runat="server" Value='<%# Eval("AnsweredTimeSecs") %>' ClientIDMode="Static"/>
<asp:HiddenField ID="HdOptionAnswered" runat="server" Value='<%# Eval("OptionAnswered") %>' ClientIDMode="Static"/>
</div>
<div>
<asp:Label ID="Question" runat="server" Text='<%# Eval("Question") %>'></asp:Label>
</div>
<div class="answer-row" id="divOption1" runat="server">
<asp:RadioButton ID="Option1" runat="server" GroupName="Answer" value="1" Text='<%# Eval("Option1") %>'
CssClass="rdbtn" Style="vertical-align: middle" ClientIDMode="Static"/>
<asp:Label ID="lblOpt1" runat="server" Text=""></asp:Label>
</div>
<div class="answer-row" id="divOption2" runat="server">
<asp:RadioButton ID="Option2" runat="server" GroupName="Answer" value="2" Text='<%# Eval("Option2") %>'
CssClass="rdbtn" Style="vertical-align: middle" ClientIDMode="Static"/>
<asp:Label ID="lblOpt2" runat="server" Text=""></asp:Label>
</div>
<div class="answer-row" id="divOption3" runat="server">
<asp:RadioButton ID="Option3" runat="server" GroupName="Answer" value="3" Text='<%# Eval("Option3") %>'
CssClass="rdbtn" Style="vertical-align: top; left: auto;" ClientIDMode="Static"/>
<asp:Label ID="lblOpt3" runat="server" Text=""></asp:Label>
</div>
<div class="answer-row" id="divOption4" runat="server">
<asp:RadioButton ID="Option4" runat="server" GroupName="Answer" value="4" Text='<%# Eval("Option4") %>'
CssClass="rdbtn" Style="vertical-align: text-top" ClientIDMode="Static"/>
<asp:Label ID="lblOpt4" runat="server" Text=""></asp:Label>
</div>
<div class="answer-row" id="divOption5" runat="server">
<asp:RadioButton ID="Option5" runat="server" GroupName="Answer" value="4" Text='<%# Eval("Option5") %>'
CssClass="rdbtn" Style="vertical-align: text-top" ClientIDMode="Static"/>
<asp:Label ID="lblOpt5" runat="server" Text=""></asp:Label>
</div>
</div>
</ItemTemplate>
</asp:DataList>
</asp:Panel>
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<div class="row">
<div class="span8" align="center">
<asp:Button ID="btnClear" runat="server" Text="Clear Selection"
CssClass="btn btn-warning" OnClientClick="Clearbutton();"
/>
<asp:Button ID="btnSave" runat="server" Text="Save & Next" CssClass="btn btn-success" OnClientClick="Savebutton()"/>
</div>
<div class="span4" align="center">
<asp:Button ID="btnReview" runat="server" Text="Mark Review & Next" CssClass="btn btn-info" OnClientClick="Reviewbutton()"/>
<asp:Button ID="btnFinish" runat="server" Text="Finish" CssClass="btn btn-danger" OnClientClick="Finishbutton()"/>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnReview" />
<asp:AsyncPostBackTrigger ControlID="btnClear" />
<asp:AsyncPostBackTrigger ControlID="btnSave" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DataListQuestion" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
HiddenField HdSlNo = (HiddenField)e.Item.FindControl("HdSlNo");
RadioButton Option1 = (RadioButton)e.Item.FindControl("Option1");
RadioButton Option2 = (RadioButton)e.Item.FindControl("Option2");
RadioButton Option3 = (RadioButton)e.Item.FindControl("Option3");
RadioButton Option4 = (RadioButton)e.Item.FindControl("Option4");
RadioButton Option5 = (RadioButton)e.Item.FindControl("Option5");
Option1.ID = "rdbtnoption1_" + HdSlNo.Value.ToString();
Option2.ID = "rdbtnoption2_" + HdSlNo.Value.ToString();
Option3.ID = "rdbtnoption3_" + HdSlNo.Value.ToString();
Option4.ID = "rdbtnoption4_" + HdSlNo.Value.ToString();
Option5.ID = "rdbtnoption5_" + HdSlNo.Value.ToString();
}
In my design page code , using Datalist i am binding 50 questions . while binding itself i am hiding 2 to 50 questions . Question 1 only visible. I tried to give dynamic id for every questions and options using event databound and rowcreated. First it got error , after that i changed properties as ClientIDMode="Static" for controls.it shown different id. But if i click any button event again it clear the id's.again it shows old ids only.

asp.net ModalPopupExtender not behaving properly

I have the following code on a .aspx file. If I comment out the ModalPopupExtender code works fine.:
<cc1:ModalPopupExtender BehaviorID="mdlPopup" runat="server" TargetControlID="btn"
ID="mdl1" PopupControlID="pnlPopup" OkControlID="LinkButton1" BackgroundCssClass="modalBackground" />
<asp:Panel ID="pnlPopup" runat="server" CssClass="confirm-dialog" Style="display: none;">
<div class="inner">
Work Order #: <asp:TextBox ID="txtWorkOrder" runat="server" Width="285" Text=""></asp:TextBox><br /><br />
Please Enter Corrective Actions<br />
<asp:TextBox ID="TextBox2" runat="server" Height="150" Width="285" TextMode="MultiLine"
Text=""></asp:TextBox>
<asp:Button ID="btnOK" runat="server" Font-Bold="true" Text="Submit" OnClick="click"
Width="150" />
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="close" OnClick="cancel" />
</div>
</asp:Panel>
<asp:Button ID="btn" runat="server" Style="display: none;" />
<asp:Label ID="id" runat="server" Text="Label" Visible="false"></asp:Label>
The problem that I am having is that the page just hangs when I have this code in the .aspx file. Is there anything I should do. It does not even get to the Page_Load.
I am calling this page that has the above code with the following:
string url = "Alerts.aspx?";
url += "ID=" + id.Text;
Response.Redirect(url);

Modalpopup with UpdatePanel

I have an autocompleteextender that displays the list of countries. In the same textbox, when I type something and click on "Search" button, a pop-up should be opened and should display the matching countries. I am using modalpopupextender for the popup.
aspx code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:TextBox id="TextBox1" runat="server" Width="250px"></asp:TextBox>
<asp:ImageButton id="ImageButton1" onclick="imgBtnSearch_Click" runat="server" ImageUrl="~/Images/Lab/search.jpg"></asp:ImageButton>
<cc1:AutoCompleteExtender id="TextBox1_AutoCompleteExtender" runat="server" EnableCaching="true" CompletionSetCount="10" MinimumPrefixLength="1" ServicePath="AutoComplete.asmx" UseContextKey="True" TargetControlID="TextBox1" ServiceMethod="GetCountryInfo">
</cc1:AutoCompleteExtender>
<cc1:ModalPopupExtender id="ModalPopupExtender1" runat="server" TargetControlID="ImageButton1" BackgroundCssClass="ModalPopupBG" Drag="true" PopupDragHandleControlID="PopupHeader" PopupControlID="updatePanel2" CancelControlID="btnCancel" ></cc1:ModalPopupExtender>
</contenttemplate>
</asp:UpdatePanel>
<asp:UpdatePanel id="updatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:RadioButtonList id="RadioButtonList1" runat="server" Width="400" Height="400" RepeatColumns="5" RepeatLayout="Table" RepeatDirection="Vertical" AutoPostBack="True"></asp:RadioButtonList>
<DIV class="Controls">
<INPUT id="btnOk" type="button" value="OK" />
<INPUT id="btnCancel" type="button" value="Cancel" />
</DIV>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ImageButton1" EventName="Click"></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
And in my codebehind:
protected void imgBtnSearch_Click(object sender, ImageClickEventArgs e)
{
LoadCountryPopUp();
ModalPopupExtender1.Show();
}
I am not getting any countries in my popup, although I get results via my autocompleteextender. On clicking the imagebutton, I get the popup without any content. Pls help!
Place your popup contents inside panel like this:
<asp:UpdatePanel id="updatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel id="pnlPopup" runat="server">
<asp:RadioButtonList id="RadioButtonList1" runat="server" Width="400" Height="400" RepeatColumns="5" RepeatLayout="Table" RepeatDirection="Vertical" AutoPostBack="True"></asp:RadioButtonList>
<DIV class="Controls">
<INPUT id="btnOk" type="button" value="OK" />
<INPUT id="btnCancel" type="button" value="Cancel" />
</DIV>
</Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ImageButton1" EventName="Click"></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
and replace UpdatePanel's controls Id with this Panel's id:
<cc1:ModalPopupExtender id="ModalPopupExtender1" runat="server" TargetControlID="ImageButton1" BackgroundCssClass="ModalPopupBG" Drag="true" PopupDragHandleControlID="PopupHeader" PopupControlID="pnlPopup" CancelControlID="btnCancel" ></cc1:ModalPopupExtender>
and check if it works?
Try putting the extenders outside of the update panel, it should not be a child of what it is extending

Resources