I'm having an intermittent problem with the CollapsiblePanelExtender.
The way we are using them is to wrap it around a gridview, so that only the header-row is displayed(which contains a checkbox for select all) while collapsed. The page always load as collapsed.
about 95% of the time, this will work perfectly fine, however, once in a while the cpe loads with the right height set, but display:none as style instead of display:block.
This results in the panel being fully "collapsed". It's still possible to extend it, and when you subsequently collapse it, it works as intended.
Have anyone else experienced the same kind of issues with CPE?
Main usercontrol:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="FlightFareExplorer.ascx.cs"
Inherits="UserControls_Rowfilters_FlightFareExplorer" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%# Register Src="FareBasis.ascx" TagName="FareBasis" TagPrefix="uc4" %>
<%# Register Src="Flight.ascx" TagName="Flight" TagPrefix="uc3" %>
<%# Register Assembly="BusyBoxDotNet" Namespace="BusyBoxDotNet" TagPrefix="busyboxdotnet" %>
<busyboxdotnet:BusyBox ID="bsbWait" runat="server" Position="Center" ShowBusyBox="Custom"
Image="Custom" OverlayOpacity="25" ImageUrl="/Images/Misc/logo_anim.gif" Text="Your query is currently being processed" />
<asp:UpdatePanel ID="upHeader" ChildrenAsTriggers="false" UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<cc1:AnimationExtender runat="server" ID="aeTest" TargetControlID="pnlMenu">
<Animations>
<OnClick>
<Sequence>
<StyleAction AnimationTarget="pnlSettings" attribute="display" value="none" />
<StyleAction AnimationTarget="pnlSettings" attribute="zIndex" value="-100" />
<StyleAction AnimationTarget="pnlMenu" attribute="display" value="none" />
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
<cc1:AnimationExtender runat="server" ID="AnimationExtender1" TargetControlID="pnlHeader">
<Animations>
<OnClick>
<Sequence>
<StyleAction AnimationTarget="pnlMenu" attribute="display" value="block" />
<StyleAction AnimationTarget="pnlSettings" attribute="zIndex" value="1000" />
<StyleAction AnimationTarget="pnlSettings" attribute="display" value="inline" />
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
<div style="height: 18px; overflow: hidden;">
<div onclick="__doPostBack('<%= upFlightFare.ClientID %>', 'Open');">
<asp:Panel runat="server" ID="pnlHeader" CssClass="boxDataHead" Width="100%" onmouseover="document.body.style.cursor='pointer';"
onmouseout="document.body.style.cursor='default';">
<asp:Label runat="server" ID="lblHeader">Flight/Fare Details</asp:Label>
<asp:Image runat="server" ID="imgCollapsed" ImageUrl="~/Images/Misc/Pil_h_7x7_wh_bggreen.gif" />
</asp:Panel>
</div>
<div onclick="__doPostBack('<%= upFlightFare.ClientID %>', 'Close');">
<asp:Panel runat="server" ID="pnlMenu" CssClass="boxDataHead float" Width="100%"
onmouseover="document.body.style.cursor='pointer';" onmouseout="document.body.style.cursor='default';">
<asp:Label runat="server" ID="lblMenu">Flight/Fare Details(Click here to close)</asp:Label>
<asp:Image runat="server" ID="imgExpanded" ImageUrl="~/Images/Misc/Pil_ned_7x7_wh_bggreen.gif" />
</asp:Panel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Panel runat="server" ID="pnlSettings" CssClass="FFE">
<asp:UpdateProgress ID="upExplorer" runat="server" AssociatedUpdatePanelID="upFlightFare"
DisplayAfter="50">
<ProgressTemplate>
<table border="0">
<tr>
<td rowspan="2">
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Misc/logo_anim.gif" />
</td>
<td>
<p style="margin: 15px 10px 0px; font-weight: bold; font-style: normal; font-size: 11pt;
font-family: Verdana; color: black;">
Please wait</p>
</td>
</tr>
<tr>
<td>
<p id="ctl00_cntMain_ucAnalysisSettings_bsbWaitText" style="margin: 20px 10px 15px;
font-weight: normal; font-style: normal; font-size: 8pt; font-family: Verdana;
color: black;">
Your query is currently being processed</p>
</td>
</tr>
</table>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel runat="server" ID="upFlightFare">
<ContentTemplate>
<cc1:AnimationExtender runat="server" ID="AnimationExtender2" TargetControlID="btnResetSelection">
<Animations>
<OnClick>
<Sequence>
<StyleAction AnimationTarget="pnlSettings" attribute="display" value="none" />
<StyleAction AnimationTarget="pnlSettings" attribute="zIndex" value="-100" />
<StyleAction AnimationTarget="pnlMenu" attribute="display" value="none" />
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
<cc1:AnimationExtender runat="server" ID="AnimationExtender3" TargetControlID="btnClose">
<Animations>
<OnClick>
<Sequence>
<StyleAction AnimationTarget="pnlSettings" attribute="display" value="none" />
<StyleAction AnimationTarget="pnlSettings" attribute="zIndex" value="-100" />
<StyleAction AnimationTarget="pnlMenu" attribute="display" value="none" />
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
<div class="boxDataFullCtrl">
<div style="text-align: right">
<asp:Button ID="btnUpdate" runat="server" Text="Save & Update" OnClick="btnUpdate_Click"
ToolTip="Saves your current selection and requeries the database" CssClass="ctrl ctrlABtnL" />
<asp:Button ID="btnResetSelection" runat="server" Text="Reset" OnClick="btnResetSelection_Click"
ToolTip="Resets all filters and closes the window" CssClass="ctrl ctrlABtn" />
<asp:Button ID="btnClose" runat="server" Text="Close" ToolTip="Closes the window without saving your changes"
CssClass="ctrl ctrlABtn" />
</div>
<table border="0">
<tr>
<td valign="top">
<uc3:Flight ID="ucFlightOutFilter" runat="server" ReturnFlights="false" SessionKey="Out" />
<br />
<uc4:FareBasis ID="ucFareBasisOutFilter" runat="server" ReturnFares="false" SessionKey="Out" />
</td>
<td valign="top">
<uc3:Flight ID="ucFlightHomeFilter" runat="server" ReturnFlights="true" SessionKey="Home" />
<br />
<uc4:FareBasis ID="ucFareBasisHomeFilter" runat="server" ReturnFares="true" SessionKey="Home" />
</td>
</tr>
</table>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnUpdate" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
Embedded usercontrol:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="Flight.ascx.cs" Inherits="UserControls_FlightFilter" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<table border="0" cellpadding="3">
<tr>
<td style="background-color: #F8F8F8;">
<cc1:CollapsiblePanelExtender runat="server" ID="cpeFlights" TargetControlID="pnlFlightsContent"
CollapsedSize="0" Collapsed="false" ExpandControlID="pnlFlightsHeader" CollapseControlID="pnlFlightsHeader"
ExpandDirection="Vertical" ImageControlID="imgHeaderExpand" CollapsedImage="~/Images/Misc/plus.gif"
ExpandedImage="~/Images/Misc/minus.gif" SuppressPostBack="true" />
<asp:Panel ID="pnlFlightsHeader" runat="server">
<asp:ImageButton ID="imgHeaderExpand" CommandName="Expand" runat="server" ImageUrl="~/Images/Misc/plus.gif" />
<asp:Label ID="lblHeader" runat="server" Style="font-weight: bold;">Flights</asp:Label>
</asp:Panel>
<asp:Panel ID="pnlFlightsContent" runat="server">
<asp:Label ID="lblNoDataWarning" runat="server" CssClass="ctrl err" Visible="false">We we're unable to locate any flights for your current search parametres.</asp:Label>
<asp:Repeater runat="server" ID="rptFlights" OnItemDataBound="rptFlights_ItemDataBound">
<ItemTemplate>
<cc1:CollapsiblePanelExtender runat="server" ID="cpeGrid" TargetControlID="pnlFlight"
CollapsedSize="22" Collapsed="true" ExpandControlID="pnlOpenClose" CollapseControlID="pnlOpenClose"
ExpandDirection="Vertical" ImageControlID="imgExpand" CollapsedImage="~/Images/Misc/plus.gif"
ExpandedImage="~/Images/Misc/minus.gif" SuppressPostBack="true" />
<asp:PlaceHolder runat="server" ID="plhCarrier" Visible="false">
<asp:Panel runat="server" ID="pnlOpenClose">
<asp:Label runat="server" ID="lblCount" Style="float: right; padding-right: 4px;
color: #008800; font-weight: bold;"></asp:Label>
<div id="spnWeekHeader" class="tblHead" style="width: 207px; font-size: 11px; font-weight: bold;
border: solid 1px black; border-bottom: 0px;" runat="server">
<asp:ImageButton ID="imgExpand" CommandName="Expand" runat="server" ImageUrl="~/Images/Misc/plus.gif" />
<asp:Label runat="server" ID="lblrepeater">TEST</asp:Label>
</div>
</asp:Panel>
<asp:Panel runat="server" ID="pnlFlight" Height="22px" Style="overflow: hidden;">
<asp:GridView ID="gdvFlights" runat="server" AutoGenerateColumns="false" OnRowDataBound="gdvFlights_RowDataBound"
OnDataBound="gdvFlights_DataBound" CssClass="tbl ctrl">
<RowStyle BorderColor="black" BorderWidth="1px" BorderStyle="Solid" />
<AlternatingRowStyle CssClass="altRow" />
<HeaderStyle CssClass="tblHead" Wrap="true" />
<Columns>
<asp:TemplateField HeaderStyle-CssClass="tblHeadAdv" ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<asp:CheckBox ID="chkSelectAllFlight" runat="server" Checked="false" AutoPostBack="false" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkSelectFlight" runat="server" Checked="false" AutoPostBack="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FlightNo" HeaderText="Flight Number" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Origin" HeaderText="Origin" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Destination" HeaderText="Destination" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="POS" HeaderText="POS" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Carrier" HeaderText="Carrier" HtmlEncode="false" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Dep. time" DataField="DepartureTime" HtmlEncode="false"
HeaderStyle-CssClass="tblHeadAdv" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="StopOver" HeaderText="Via" HeaderStyle-CssClass="tblHeadAdv"
ItemStyle-HorizontalAlign="Center" />
</Columns>
</asp:GridView>
</asp:Panel>
</asp:PlaceHolder>
<br />
</ItemTemplate>
</asp:Repeater>
</asp:Panel>
</td>
</tr>
</table>
Related
I have a problem with my footer as I divided the page as follow:
<%# Page Title="" Language="C#" MasterPageFile="~/SVM.Master" AutoEventWireup="true" CodeBehind="Cateshow.aspx.cs" Inherits="beravoSV.Cateshow" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.style8 {
color: #333333;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="midcont">
<div class="leftsidemainadsshow">
<br />
<asp:ListView ID="cateshowlistview" runat="server" DataSourceID="categoryshowsql" Style="text-align: left">
<ItemTemplate>
<div class="templist">
<asp:LinkButton ID="Adstitlinkbtn" runat="server"
Style="font-weight: 700; color: #0066FF" Text='<%# Eval("AdsTit") %>'
CssClass="adstit" OnClick="Adstitlinkbtn_Click"
PostBackUrl='<%# "AdsDetails.aspx?AdsTit=" + Eval("AdsID") %>'></asp:LinkButton>
<br />
<asp:ImageButton ID="ImageButton3" runat="server" Height="88px" Width="91px"
CssClass="imag1" ImageUrl='<%# "/images/AdsImgs/" + Eval("Img1") %>'
PostBackUrl='<%# "AdsDetails.aspx?Img1=" + Eval("AdsID") %>' />
<br />
<asp:Label ID="AdsDescLabel" runat="server" Text='<%# Eval("AdsDesc") %>'
CssClass="adsdisc" />
<br />
<br />
<br />
<br />
<asp:Label ID="Sectlbl" runat="server" Text='<%# Eval("Section") %>'
Style="color: #333333"></asp:Label>
-
<asp:Label ID="categlbl" runat="server" Text='<%# Eval("Category") %>'
Style="color: #333333; font-weight: 700; font-style: italic;"></asp:Label>
<br />
<asp:Label ID="CountryLabel" runat="server" Text='<%# Eval("Country") %>'
Style="color: #333333" />
-
<asp:Label ID="StateLabel" runat="server" Text='<%# Eval("State") %>'
Style="color: #333333" />
-
<asp:Label ID="CityLabel" runat="server" Text='<%# Eval("City") %>'
Style="color: #333333" />
<div class="adsprice">
<span class="style8">Price:</span>
<asp:Label ID="AdsPriceLabel" runat="server" Style="color: #FF0000"
Text='<%# Eval("AdsPrice") %>' />
</div>
<div class="iconadsbox">
<asp:ImageButton ID="Likebtn" runat="server"
ImageUrl="~/iconsimg/favoritestar2.png" OnClick="Likebtn_Click" />
<asp:ImageButton ID="sendmailbtn" runat="server"
ImageUrl="~/iconsimg/mailposter.png" OnClick="sendmailbtn_Click" />
</div>
<asp:Image ID="Image1" runat="server" CssClass="divideline" />
<br />
</div>
</ItemTemplate>
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
<asp:DataPager ID="DataPager2" runat="server" PagedControlID="cateshowlistview" PageSize="7">
<Fields>
<asp:NumericPagerField />
<asp:NextPreviousPagerField />
</Fields>
</asp:DataPager>
</LayoutTemplate>
</asp:ListView>
</div>
<div class="primumads">
</div>
<br />
<br />
<asp:SqlDataSource ID="categoryshowsql" runat="server"
ConnectionString="<%$ ConnectionStrings:BeravaConnectionString %>"
SelectCommand="SELECT DISTINCT [AdsID],[Section], [Category], [Country], [State], [City], [AdsTit], SUBSTRING([AdsDesc],1,155) as AdsDesc, [AdsPrice], [Img1] FROM [ads] WHERE (([Category] = #Category) AND ([Country] = #Country))">
<SelectParameters>
<asp:QueryStringParameter Name="Category" QueryStringField="cat"
Type="String" />
<asp:SessionParameter Name="Country" SessionField="location" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
<br />
</asp:Content>
When the rightside is empty the footer is going up and if it is full its will come down to the bottom. How I can make it always down even if the right side is empty?
You can find the below link to know more what is going up with me
enter link description here
You can add to te footer the following:
style="position: fixed; bottom: 0; width: 100% (This will fix the footer to the bottom of your screen)
If what is to fix the footer to the end of you page, you need to give to the header and to the content of your page a min height, here's an example:
<div id="header" style="min-height: 10%"></div>
<div id="content" style="min-height: 80%"></div>
<div id="footer" style="min-height: 10%"></div>
Note: you don't need to say that min-height: 10% in the footer, that's implicit.
I shown Modal popup (Modal2) on this Modal popup I have grid contain link button.
on click event of link button i have to show another modal popup having grid.
My First Modal popup Showing
<asp:Button ID="btnScholershipApp" runat="server" Text="Button" SkinID="SelectButton" />
<Ajax:ModalPopupExtender ID="Modal2" runat="server" PopupControlID="table2" CancelControlID="img1"
TargetControlID="btnScholershipApp" OnCancelScript="javascript:__doPostBack('clearfields2')">
</Ajax:ModalPopupExtender>
First Modal popup
<table id="table2" runat="server" border="0" cellpadding="0" cellspacing="0" height="100%"
style="border-collapse: collapse; height: auto; margin: 0px; padding: 0px; display: none;"
width="1000" class="popupheading">
<tr>
<td>
<div style="width: 1000px; height: auto;">
<div style="width: 1000px; height: 40px; background-image: url('../../../PopU/top.png');
background-repeat: no-repeat;">
<img id="img1" runat="server" height="40" src="~/Images/close1.png" style="float: right;"
width="40" />
</div>
<div style="width: 980px; height: auto; min-height: 100px; background-image: url('../../../PopU/center_bg.png');
background-repeat: repeat-y; padding: 0 10px 0 10px;">
<asp:Panel ID="modal_panel2" runat="server" Height="550" Width="980">
<table cellpadding="7px" cellspacing="7px" width="100%">
<tr>
<td>
<fieldset>
<legend class="legend">Search </legend>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="Student Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSAStudentName" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="Label6" runat="server" Text="Student ID"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSAStudentID" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="Label4" runat="server" Text="Scholership Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSAScholershipName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="University PRN"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSAScholershipPRN" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="Label12" runat="server" Text="Date Of Birth"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSADateOfBirth" runat="server"></asp:TextBox>
<ajaxtoolkit:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True"
TargetControlID="txtSADateOfBirth">
</ajaxtoolkit:CalendarExtender>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<table width="100%">
<tr style="background-color: #F6F0DB;">
<td align="center" colspan="4">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:HiddenField ID="hfScholershipName" runat="server" />
<asp:HiddenField ID="hfScholershipPRN" runat="server" />
<asp:HiddenField ID="hfScholershipApplicationID" runat="server" />
<asp:HiddenField ID="hfScholershipDocumentID" runat="server" />
<asp:GridView ID="grdScholershipApp" runat="server" AutoGenerateColumns="false" AllowPaging="True"
OnPageIndexChanging="grdScholershipApp_PageIndexChanging" PageSize="10" Width="970px">
<Columns>
<asp:BoundField DataField="StudentId" HeaderText="Student ID" />
<asp:BoundField DataField="FullName" HeaderText="Student Name">
<ItemStyle HorizontalAlign="Center" Width="250" />
</asp:BoundField>
<asp:BoundField DataField="ScholershipPRN" HeaderText="University PRN" />
<asp:BoundField DataField="DateOfBirth" HeaderText="Date of birth" />
<asp:BoundField DataField="ScholershipName" HeaderText="Scholership Name" />
<asp:TemplateField HeaderText="Options">
<ItemTemplate>
<asp:UpdatePanel ID="pnlup2" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnEditStudentApplication" />
</Triggers>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnStudentDocumentIDShow" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:ImageButton ID="btnEditStudentApplication" runat="server" CommandArgument='<%#Eval("PanomtechServiceID")+";"+Eval("StudentID")+";"+Eval("ScholershipPRN")+";"+Eval("ScholershipName")%>'
SkinID="Select" OnClick="btnEditStudentApplication_Click" />
<%--<asp:Panel ID="Panel12" runat="server" >
<asp:UpdatePanel ID="UpdatePanel4" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="hfbtnStudentDocumentIDShow" runat="server" Style="display: none;" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="hfbtnStudentDocumentIDShow" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</asp:Panel>--%>
<asp:LinkButton ID="btnStudentDocumentIDShow" runat="server" Text="Documents" CommandArgument='<%#Eval("PanomtechServiceID")+";"+Eval("StudentID")+";"+Eval("StudentDocumentID")%>'
OkControlID="hfbtnStudentDocumentIDShow" />
<%-- OnClick="hfbtnStudentDocumentIDShow_Click" --%>
<%--<Ajax:ModalPopupExtender ID="modal4" runat="server" PopupControlID="table4" CancelControlID="img3"
TargetControlID="btnStudentDocumentIDShow" OnCancelScript="javascript:__doPostBack('clearfields4')">
</Ajax:ModalPopupExtender>--%>
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
no data.......
</EmptyDataTemplate>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Panel>
</div>
<div style="width: 1000px; height: 40px; background-image: url('../../../PopU/bottom.png');
background-repeat: no-repeat;">
</div>
</div>
</td>
</tr>
</table>
<Ajax:AnimationExtender ID="AnimationExtender2" runat="server" TargetControlID="btnScholershipApp">
<Animations>
<OnClick>
<Parallel AnimationTarget="table2"
Duration=".9" Fps="50">
<FadeIn Duration=".9"/>
</Parallel>
</OnClick>
</Animations>
</Ajax:AnimationExtender>
LinkButton Event
protected void hfbtnStudentDocumentIDShow_Click(object sender, EventArgs e)
{
modal4.Show();
}
Second Modal popup
<table id="table4" runat="server" border="0" cellpadding="0" cellspacing="0" height="100%"
style="border-collapse: collapse; height: auto; margin: 0px; padding: 0px;" width="1000"
class="popupheading">
<tr>
<td>
<div style="width: 1000px; height: auto;">
<div style="width: 1000px; height: 40px; background-image: url('../../../PopU/top.png');
background-repeat: no-repeat;">
<img id="img4" runat="server" height="40" src="~/Images/close1.png" style="float: right;"
width="40" />
</div>
<div style="width: 980px; height: auto; min-height: 100px; background-image: url('../../../PopU/center_bg.png');
background-repeat: repeat-y; padding: 0 10px 0 10px;">
<asp:Panel ID="modal_panel4" runat="server" Height="550" Width="980">
<table width="100%">
<tr style="background-color: #F6F0DB;">
<td align="center" colspan="4">
<asp:UpdatePanel ID="uppanel" runat="server">
<ContentTemplate>
<asp:GridView ID="grdStudentDocuments" runat="server" AutoGenerateColumns="false"
AllowPaging="True" OnPageIndexChanging="grdStudentDocuments_PageIndexChanging"
PageSize="10" Width="970px">
<Columns>
<asp:BoundField DataField="StudentId" HeaderText="Student ID" />
<asp:BoundField DataField="FullName" HeaderText="Student Name">
<ItemStyle HorizontalAlign="Center" Width="250" />
</asp:BoundField>
<asp:BoundField DataField="DocumentName" HeaderText="Document Name" />
<asp:BoundField DataField="ScholershipPRN" HeaderText="University PRN" />
<asp:BoundField DataField="ScholershipName" HeaderText="Scholership Name" />
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:UpdatePanel ID="pnlup3" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="btnEditSStudentDocuments" />
</Triggers>
<ContentTemplate>
<asp:ImageButton ID="btnEditSStudentDocuments" runat="server" CommandArgument='<%#Eval("StudentDocumentID")%>'
SkinID="Select" OnClick="btnEditSStudentDocuments_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
no data.......
</EmptyDataTemplate>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Panel>
</div>
<div style="width: 1000px; height: 40px; background-image: url('../../../PopU/bottom.png');
background-repeat: no-repeat;">
</div>
</div>
</td>
</tr>
</table>
<asp:Button ID="hfbtnStudentDocumentIDShow" runat="server" OnClick="hfbtnStudentDocumentIDShow_Click"
Style="display: none;" />
<Ajax:ModalPopupExtender ID="modal4" runat="server" PopupControlID="table4" CancelControlID="img3"
TargetControlID="hfbtnStudentDocumentIDShow" OnCancelScript="javascript:__doPostBack('clearfields4')">
</Ajax:ModalPopupExtender>
<Ajax:AnimationExtender ID="AnimationExtender4" runat="server" TargetControlID="hfbtnStudentDocumentIDShow">
<Animations>
<OnClick>
<Parallel AnimationTarget="table4"
Duration=".9" Fps="50">
<FadeIn Duration=".9"/>
</Parallel>
</OnClick>
</Animations>
</Ajax:AnimationExtender>
Problem
When I click on link button it does not display any thing Please help me
Try this, i read somewhere on a blog that when i was stuck in this issue that using ModaloPopup Extender in Update Panel causes issue if we do not use them in the right order, the code i am posting works fine for me, in my case also i am using ModalPopupExtender within update panel try this order of ModalPopupExtender with Update Panel, it will surely work:
<div class="popup">
<asp:Button ID="Button7" runat="server" Text="Button" Style="display: none;" />
<asp:Button ID="Button8" runat="server" Style="display: none;" />
<asp:ModalPopupExtender ID="ModalPopupUploadFiles" BehaviorID="ModalPopupUploadFiles" runat="server" CancelControlID="ImageButton1"
TargetControlID="Button7" PopupControlID="PanelUploadFiles" PopupDragHandleControlID="PopupHeader"
Drag="true" BackgroundCssClass="Overlay">
<Animations>
<OnShown>
<FadeIn Duration=".50" Fps="10" />
</OnShown>
</Animations>
</asp:ModalPopupExtender>
<!--unique css-->
<asp:Panel ID="PanelUploadFiles" runat="server" Style="display: none; overflow:scroll; width:750px; height:400px;" class="PopUpPanel">
<asp:Panel ID="panel1" runat="server" class="closeButton">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/cross.png"/>
</asp:Panel>
<asp:UpdatePanel ID="updtPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="True">
<ContentTemplate>
<br />
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<td align="left" valign="top">
<table id="delgateContainer" width="90" border="0" align="left" cellpadding="0" cellspacing="3">
<tr align="center" valign="middle">
<td><asp:ImageButton ID="btnAddFiles" ClientIDMode="Static" ImageUrl="~/images/add.gif" runat="server"/></td>
<td><asp:ImageButton ID="btnStartUpload" ClientIDMode="Static" ImageUrl="~/images/start.gif" runat="server" OnClick="btnStartUpload_Click" /></td>
<td><asp:ImageButton ID="btnCancelUpload" ImageUrl="~/images/cancel.gif" runat="server" OnClick="btnCancelUpload_Click" /></td>
<td><asp:ImageButton ID="btnDeleteAllUploads" ClientIDMode="Static" ImageUrl="~/images/delete2.gif" runat="server" OnClick="btnDeleteAllUploads_Click" /></td>
<td align="left"><asp:CheckBox ID="chckBoxDeleteAll" ClientIDMode="Static" runat="server" /></td>
<td> </td>
</tr>
<tr align="center" valign="middle">
<td colspan="6"> </td>
</tr>
</table>
<p class="gr"><strong></strong></p><p> </p></td>
</tr>
<tr>
<td height="1" colspan="2" class="bgbl"></td>
</tr>
</table></td>
</tr>
<asp:GridView ID="gvUploadFiles" ClientIDMode="Static" onRowCommand="gvUploadFiles_Clicked" DataKeyNames="FileID,FileName,FileSize,FilePath,Status" AllowPaging="false" runat="server"
PagerStyle-HorizontalAlign="Center" AutoGenerateColumns="false" Width="90%"
CellPadding="0" BorderWidth="0" AlternatingRowStyle-BorderColor="LightGray" AlternatingRowStyle-BorderWidth="1" GridLines="None" ShowHeader="true" AlternatingRowStyle-BackColor="#f9f9f9" >
<Columns>
<asp:ImageField DataImageUrlField="ThumbanilPath" HeaderText="Thumbnail" ItemStyle-CssClass="alignmentCenter" ControlStyle-Width="100px" ControlStyle-Height="100px" runat="server"></asp:ImageField>
<asp:BoundField DataField="FileName" ItemStyle-CssClass="alignmentCenter" HeaderText="File Name" />
<asp:BoundField DataField="FileSize" ItemStyle-CssClass="alignmentCenter" HeaderText="File Size" />
<asp:TemplateField>
<ItemTemplate>
<asp:HiddenField ID="filePaths" Value="FilePath" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton CommandName="doingUpload" ItemStyle-CssClass="alignmentRight" class="btnStart" CommandArgument='<%#Container.DisplayIndex%>' ID="imgBtnStart" ImageUrl="~/images/start2.gif" runat="server" /></ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="imgBtnCancel" ItemStyle-CssClass="alignmentLeft" CommandName="cancelUploading" CommandArgument='<%#Container.DisplayIndex%>' ImageUrl="~/images/cancel2.gif" runat="server" /></ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton CommandName="deleteFile" ItemStyle-CssClass="alignmentRight" Visible="false" id="imgBtnDelete" CommandArgument='<%#Container.DisplayIndex%>' runat="server" ImageUrl="~/images/delete2.gif"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox Visible="false" ID="chckBoxDelete" ItemStyle-CssClass="alignmentLeft" class="deleteChkBox" ClientIDMode="Static" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:HiddenField ID="uploadStatus" Value="Status" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FileID" Visible="false" />
</Columns>
</asp:GridView>
<div id="UploadControl1">
<asp:Button ID="Button17" runat="server" Style="display: none;" />
<asp:ModalPopupExtender ID="ModalPopupUploadControl" BehaviorID="ModalPopupUploadControl" runat="server" CancelControlID="ImageButton4"
TargetControlID="btnAddFiles" PopupControlID="Panel5" PopupDragHandleControlID="PopupHeader"
Drag="true" BackgroundCssClass="Overlay">
<Animations>
<OnShown>
<FadeIn Duration=".50" Fps="10" />
</OnShown>
</Animations>
</asp:ModalPopupExtender>
<asp:Panel ID="Panel5" runat="server" class="PopUpPanel"
style="display: none;overflow:hidden; height:100px; width:300px;"><!---unique css-->
<asp:Panel ID="panel7" runat="server" class="closeButton">
<asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/images/cross.png"
/>
</asp:Panel>
<div id="uploadControl" class="all">
<div></div>
<asp:FileUpload ID="uploadingFiles" ClientIDMode="Static" runat="server" class="all" style="display:none;" /><br /><br />
<asp:ImageButton ID="imgBtnAddFile" ClientIDMode="Static" runat="server" ImageUrl="~/images/addToGrid.jpg" OnClick="btnAddToList_Click" style="Display:none;" class="all"/>
</div>
<div>
</div>
</asp:Panel>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="imgBtnAddFile" />
<asp:AsyncPostBackTrigger ControlID="gvUploadFiles" EventName="RowCommand" />
</Triggers>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="gvUploadFiles" EventName="RowCommand" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="testing" DisplayAfter="0" AssociatedUpdatePanelID="updtPanel" runat="server">
<ProgressTemplate>
<div style=" left:0px; top:0px; position:fixed; width:100%; height:100%;
background-color:White; filter:alpha(opacity=90);opacity:0.9;">
<asp:Image ID="Image2" style="margin-left:500px; margin-top:300px;" ImageUrl="~/images/ajax-loader.gif" runat="server" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<tr>
<td align="right"><img src="../images/m7.gif" width="115" height="26" /></td>
</tr>
</table>
</asp:Panel>
</div>
I have two user controls on a aspx page. Both of them has an update panel and UpdateMode property is set to Conditional:
First one is (VoteControl):
<asp:UpdatePanel ID="VoteUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="vote">
<div class="counter">
<asp:Label ID="lblVoteCount" runat="server" />
</div>
<div class="vote-up">
<asp:ImageButton ID="btnVote" runat="server" ImageUrl="~/App_Themes/DefaultTheme/images/br_up.png" OnClick="btnVote_Click" />
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnVote" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
and the other one is (CommentControl) with an UpdatePanelAnimationExtender:
<asp:UpdatePanel ID="CommentUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="gvComments" runat="server" AutoGenerateColumns="false" ShowFooter="false"
ShowHeader="false" GridLines="None" SkinID="SimpleGrid-noFormat">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<div class="contents">
<table style="width: 100%">
<tr>
<td>
<%# "<b>" + Eval("AddedByName") + "</b>" %>
<%# Eval("CommentBody") %>
</td>
<td style="vertical-align: top; text-align: left; width: 70px; padding-right: 10px">
<div class="gravatar">
<ajaxToolkit:Gravatar ID="Gravatar1" runat="server" Width="64px" Height="64px" Email='<%# Eval("AddedByEmail") %>' />
</div>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Panel ID="AddCommentPanel" runat="server">
<div class="add-comment">
<div id="mainComment">
<asp:Panel ID="commentPanel" runat="server" ClientIDMode="Static">
<div class="comment-title">
<h2>Comments</h2>
</div>
<div>
<asp:TextBox ID="txtCommentBody" runat="server" SkinID="FormatedTextBoxRtL" Width="99%" TextMode="MultiLine" Height="100px" />
<div class="add">
<asp:Button ID="btnSaveComment" runat="server" Text="Submit" SkinID="SimpleButton"
ValidationGroup="Comment" OnClick="btnSaveComment_Click" />
<asp:HyperLink ID="HyperLink1" runat="server" Text="Discard" />
</div>
</div>
</asp:Panel>
</div>
<div id="tanks">
<asp:Panel ID="messagePanel" runat="server" Visible="false">
<div>
Thanks
</div>
</asp:Panel>
</div>
</div>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSaveComment" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<ajaxToolkit:UpdatePanelAnimationExtender ID="upae" runat="server" BehaviorID="animation" TargetControlID="CommentUpdatePanel"
AlwaysFinishOnUpdatingAnimation="true">
<Animations>
<OnUpdating>
<Sequence>
<Parallel duration="0">
<EnableAction AnimationTarget="btnSaveComment" Enabled="false" />
</Parallel>
<Parallel duration=".25" Fps="30">
<FadeOut AnimationTarget="comments" minimumOpacity=".2" />
</Parallel>
</Sequence>
</OnUpdating>
<OnUpdated>
<Sequence>
<Parallel duration=".25" Fps="30">
<FadeIn AnimationTarget="comments" minimumOpacity="1" />
</Parallel>
<Parallel duration="0">
<EnableAction AnimationTarget="comments" Enabled="true" />
</Parallel>
</Sequence>
</OnUpdated>
</Animations>
</ajaxToolkit:UpdatePanelAnimationExtender>
so, CommentControl works fine, but when I click btnVote on VoteControl, the CommentControl starts updating and stay in update mode! All code have been fired and when I refresh the aspx page, every things look like well (Database takes effects).
I do NOT know what I miss or what is my fault. Would you please help me in this?
I have a two UpdatePanels one UpdatePanel contains the Grid and the other contains data entry. When a user click on a ImageButton within the GridView it will then show to ModalPopupExtender and display the second UpdatePanel. When the user enters the data into the fields under the second UpdatePanel and if they Click the Button Report or Button Cancel I am Forcing the postback on both buttons. The problem is if the user goes back in and click on the different row on the page the data under the UpdatePanel2 is not Cleared all data remains from the first row clicked... I have tried UpdatePanel1.Update(), UpdatePanel2.Update() full page PostBack nothing works. The only thing that works is if I do Response.Redirect back to itself. But I am trying to avoid doing that and also trying to avoid clearing fields back to nothing with the .cs code. Wondering if there is a way to postback and clear all the fields under the UpdatePanel2. Thanks for your help in advance.
<asp:UpdatePanel ID="upGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div>
<span id="lblTab" runat="server" style=" font-weight:bold; font-size:larger">All Published Reports</span>
<br />
<asp:GridView
ID="gvReports"
runat="server"
CssClass="gridview"
RowStyle-CssClass="gridview_itm"
AlternatingRowStyle-CssClass="gridview_aitm"
HeaderStyle-CssClass="gridview_hdr"
PagerStyle-CssClass="gridview_pgr"
AutoGenerateColumns="False"
Width="100%" onrowcommand="gvReports_RowCommand">
<Columns>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:LinkButton ID="btnReport" runat="server" CommandName="Report" CommandArgument='<%#Eval("n_ReportFileName")%>' Text='<%#Eval("n_Name")%>' CausesValidation="false"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<%#Eval("n_Description")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" PopupControlID="ReportParameterPanel" BackgroundCssClass="modalBackground" DropShadow="True">
</asp:ModalPopupExtender>
<asp:Button ID="Button1" runat="server" Text="Button" style="visibility:hidden"/>
<asp:Panel ID="ReportParameterPanel" runat="server" Height="375px"
Width="700px" BackColor="#f4de90"
HorizontalAlign="Center" BorderColor="#666666" BorderStyle="Outset"
BorderWidth="5px">
<table style="height: 50px; width: 685px; text-align: left">
<span id="lblReportName" runat="server" style="font-weight:bold; font-size:larger"></span>
<tr>
<td align="left" style="padding-left: 5px; width: 335px;" valign="top">
<span id="StarDateStar" runat="server" style="color: Red">*Optional </span><span id="lblStartDate" runat="server">Start Date: </span>
<asp:TextBox ID="tbStartDate" runat="server"></asp:TextBox>
<asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/App_Themes/Sugar2006/images/Calendar_scheduleHS.png" ImageAlign="Middle" />
<asp:CalendarExtender ID="ceStartDate" runat="server" TargetControlID ="tbStartDate" PopupButtonID="imgCalendar" />
<asp:MaskedEditExtender ID="mexStartDate" runat="server"
TargetControlID="tbStartDate"
Mask="99/99/9999"
MaskType="Date"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError" />
<br />
<asp:MaskedEditValidator ID="mevStartDate" runat="server"
ControlToValidate="tbStartDate"
ControlExtender="mexStartDate"
Display="Dynamic"
InvalidValueMessage="This date is invalid!" Font-Bold="True"
ForeColor="#D50000" ValidationGroup="vgMyGroup" />
</td>
<td align="left" style="padding-right: 5px; padding-bottom: 5px; width: 350px;" valign="top">
<span id="EndDateStar" runat="server" style="color: Red">*Optional </span><span id="lblEndDate" runat="server">End Date: </span>
<asp:TextBox ID="tbEndDate" runat="server"></asp:TextBox>
<asp:ImageButton ID="imgCalendar2" runat="server" ImageUrl="~/App_Themes/Sugar2006/images/Calendar_scheduleHS.png" ImageAlign="Middle" />
<asp:CalendarExtender ID="ceEndDate" runat="server" TargetControlID ="tbEndDate" PopupButtonID="imgCalendar2" />
<asp:MaskedEditExtender ID="mexEndDate" runat="server"
TargetControlID="tbEndDate"
Mask="99/99/9999"
MaskType="Date"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError" />
<br />
<asp:MaskedEditValidator ID="mevEndDate" runat="server"
ControlToValidate="tbEndDate"
ControlExtender="mexEndDate"
Display="Dynamic"
InvalidValueMessage="This date is invalid!" Font-Bold="True"
ForeColor="#D50000"
ValidationGroup="vgMyGroup" />
</td>
</tr>
</table>
<table style="height: 25px; width: 685px; text-align: left">
<tr>
<td align="left" style="padding-left: 5px; width: 335px;" valign="top">
<span id="lblOperator" runat="server">Operator:</span>
<asp:DropDownList ID="Parameters" runat="server" style="margin-left: 73px">
<asp:ListItem Selected="True"><</asp:ListItem>
<asp:ListItem>></asp:ListItem>
<asp:ListItem>=</asp:ListItem>
<asp:ListItem>Completed</asp:ListItem>
<asp:ListItem>Not Completed</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
<asp:RadioButtonList ID="GroupingList" runat="server" Height="25px"
RepeatDirection="Horizontal"
AutoPostBack="true" onselectedindexchanged="GroupingList_SelectedIndexChanged"
CausesValidation="true" ValidationGroup="vgMyGroup" />
<table style="height: 25px; width: 685px; text-align: left">
<tr id="rowEntitySelectionLabels" runat="server">
<td style="padding-left: 3px; height: 16px; width: 300px;">
<asp:Label ID="GroupItemInputLabel" runat="server" />
</td>
<td style="height: 16px; width: 48px;">
</td>
<td style="height: 16px; width: 300px;">
<asp:Label ID="GroupItemsListInputLabel" runat="server" />
</td>
</tr>
<tr id="rowEntitySelections" runat="server">
<td valign="top" style="padding-left: 3px; height: 100px; width: 300px;">
<asp:ListBox ID="GroupItemInput" runat="server" Width="300px" Height="150px"
SelectionMode="multiple" BackColor="White" ForeColor="Black" />
</td>
<td align="center" valign="top" style="height: 100px; width: 50px;">
<br />
<asp:ImageButton ID="btnAddItem"
ImageUrl="~/App_Themes/Sugar2006/images/Actions-arrow-right-icon.png" runat="server"
OnClick="btnAddItem_Click" Height="18px" Width="25px"
ToolTip="Adds the Selected <Item>." CausesValidation="true" ValidationGroup="vgMyGroup" /><br />
<asp:ImageButton ID="btnAddAllItems"
ImageUrl="~/App_Themes/Sugar2006/images/Actions-arrow-right-double-icon.png" runat="server"
OnClick="btnAddAllItems_Click" Height="18px" Width="25px"
ToolTip="Adds all of the <Items>." CausesValidation="true" ValidationGroup="vgMyGroup" /><br />
<br /><br />
<asp:ImageButton ID="btnRemoveItem"
ImageUrl="~/App_Themes/Sugar2006/images/Actions-arrow-left-icon.png" runat="server"
OnClick="btnRemoveItem_Click" Height="18px" Width="25px"
ToolTip="Removes the Selected <Item>." CausesValidation="true" ValidationGroup="vgMyGroup" /><br />
<asp:ImageButton ID="btnRemoveAllItems"
ImageUrl="~/App_Themes/Sugar2006/images/Actions-arrow-left-double-icon.png" runat="server"
OnClick="btnRemoveAllItems_Click" Height="18px" Width="25px"
ToolTip="Removes all of the <Items>." CausesValidation="true" ValidationGroup="vgMyGroup" />
</td>
<td valign="top" style="height: 100px; width: 300px;" id="TD1">
<asp:ListBox ID="GroupItemsList" runat="server" Width="300px" Height="150px"
SelectionMode="multiple" BackColor="White" ForeColor="Black" />
</td>
</tr>
</table>
<asp:Button ID="btnClose" runat="server" Text="Close" CssClass="btn" onclick="btnClose_Click" CausesValidation="false" />
<asp:Button ID="btnSend" runat="server" Text="Report" CssClass="btn" OnClick="btnSend_Click" Enabled="false" CausesValidation="true" ValidationGroup="vgMyGroup" />
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnSend" />
<asp:PostBackTrigger ControlID="btnClose" />
</Triggers>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Try setting the UpdatePanel.UpdateMode Property to Conditional
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<!-- other stuff -->
</asp:UpdatePanel>
The child update panel will only refresh its children, not its parent, if the update mode is not set to conditional.
And here are a few more ways of updating update panels:
http://lisazhou.wordpress.com/2008/01/07/update-panel-different-ways-of-triggering-udates/
i added a page with html code to a master page and i got that mistake when i launched the page. i wonder what i did wrong!??!
<%# Page Title="" Language="C#" MasterPageFile="~/YourGuruMaster.master" AutoEventWireup="true" CodeFile="YourGuru.aspx.cs" Inherits="YourGuru" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style3
{
width: 114px;
}
.style4
{
width: 293px;
}
.style5
{
width: 126px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form id="form1" runat="server">
<div align="center">
<p>
<asp:TextBox ID="Question" runat="server" style="margin-left: 0px" Width="584px"></asp:TextBox>
</p>
</div>
<div align="center">
<table style="width: 553px">
<tr>
<td class="style3">
<asp:Button ID="Ask" runat="server" Text="שאל" Width="50px" />
</td>
<td class="style4">
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
     
<asp:DropDownList ID="DropDownList2" runat="server">
</asp:DropDownList>
     
<asp:DropDownList ID="DropDownList3" runat="server">
</asp:DropDownList>
</td>
<td class="style5">
<asp:Button ID="Answer" runat="server" Text="ענה" Width="50px" />
</td>
</tr>
</table>
</div>
</form>
</asp:Content>
ASP.NET Web Forms won't let you put more than one form tag in a page - your master page contains that form tag, so this:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<form id="form1" runat="server">
<div align="center">
will cause problems as it's trying to add a form tag. You don't need this form here anyways as the form tag in your master page is quite adequate.
<head runat="server">
<title></title>
</head>
<body style="direction:rtl;width:100%;background-color:#808080">
<form id="frmLevel2" runat="server">
<div dir="ltr" style="width:1000px;">
<asp:Button ID="btnExit" runat="server" OnClick="btnExit_Click" Text="خروج" />
</div>
<div>
<asp:GridView ID="GVLevel2" runat="server" Font-Names="Times New Roman" Font-Size="9pt" Width="700px" AllowPaging="True" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal">
<AlternatingRowStyle BackColor="#F7F7F7" />
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<SortedAscendingCellStyle BackColor="#F4F4FD" />
<SortedAscendingHeaderStyle BackColor="#5A4C9D" />
<SortedDescendingCellStyle BackColor="#D8D8F0" />
<SortedDescendingHeaderStyle BackColor="#3E3277" />
</asp:GridView>
</div>
<div>
<asp:Label ID="erorlabel" runat="server"></asp:Label>
<asp:Label ID="lblresult" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
My Error is " A page can have only one server-side Form tag. " too
i don't have master page