I'm using a calendar extender in a panel which popup using modalpopup extender, so panel is poped up contains the calendar extender but the calendar is behind every thing, i tried to change the z-index but all in vain, seems to me that it is a bug in the ASP.net AjaxToolKit.Any one has an idea about this problem and if it can be solved?
Edit:
<style type="text/css">
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=70);
opacity: 0.2;
}
.ob_show_panelsholder
{
border: 1px solid #736F6E;
}
.enterzipCalenderCompliant {
PADDING-RIGHT: 10px; FLOAT: left /*No display=inline*/
}
.ajax__calendar_container { z-index : 1000 ; }
</style>
<script type="text/javascript">
function calendarShown(sender, args) {
sender.style.zIndex = 10005;
}
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="_pnlShowPersonalData" runat="server">
<table class="style1">
<tr>
<td>
<asp:Image ID="_imgCurrentPP" runat="server" Height="100px" Width="100px" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="First name :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblFirstName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="Last name :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblLastName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="BirthDate :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblBirthDate" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label10" runat="server" Text="Mobile number :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblMobileNumber" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="Location :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblLocation" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label13" runat="server" Text="Gender :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblGender" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Button ID="_btnEditPersonalData" runat="server" Text="Edit Profile" />
<asp:ModalPopupExtender ID="_btnEditPersonalData_ModalPopupExtender" runat="server"
DynamicServicePath="" Enabled="True" TargetControlID="_btnEditPersonalData" BackgroundCssClass="modalBackground"
PopupControlID="_pnlEditPersonalData" CancelControlID="_btnCancel">
</asp:ModalPopupExtender>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="_pnlEditPersonalData" runat="server">
<table>
<tr>
<td>
<asp:Label ID="_FirstName" runat="server" Text="First name :" ></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtFirstName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_LastName" runat="server" Text="Last name :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtLastName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_BirthDate" runat="server" Text="Birth date :"></asp:Label>
</td>
<td class="ajax__calendar_container">
<asp:TextBox ID="_txtBirthDate" runat="server"></asp:TextBox>
<asp:MaskedEditExtender ID="_txtBirthDate_MaskedEditExtender" runat="server" Enabled="True"
TargetControlID="_txtBirthDate" MaskType="Date" ErrorTooltipEnabled="True" MessageValidatorTip="true"
Mask="99/99/9999">
</asp:MaskedEditExtender>
<div>
<asp:CalendarExtender ID="_txtBirthDate_CalendarExtender" runat="server" Enabled="True"
PopupButtonID="_btnCalendar" TargetControlID="_txtBirthDate">
</asp:CalendarExtender>
</div>
<asp:ImageButton ID="_btnCalendar" runat="server" ImageUrl="~/Images/calendar_button_b.jpg" />
<%-- <img alt="Icon" src="~/Images/calendar_button_b.jpg" id="Image1" />--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_ProfilePic" runat="server" Text="Profile picture :"></asp:Label>
</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Label ID="Label1" runat="server"></asp:Label>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="FileUpload1"--%><%-- ErrorMessage="*" ValidationGroup="signup"></asp:RequiredFieldValidator>--%>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.png|.jpg)$"
ControlToValidate="FileUpload1" ErrorMessage="Please Select Png or Jpg File"
ValidationGroup="UploadFile"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_MobileNumber" runat="server" Text="Mobile number :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtMobileNumber" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_Password" runat="server" Text="Password :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtPassword" runat="server"></asp:TextBox>
</td>
</tr>
</table>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="_pnlLocation" runat="server">
<table width="21%">
<tr>
<td>
<asp:Label ID="_Country" runat="server" Text="Country :"></asp:Label>
</td>
<td>
<uc1:CountryListUC ID="CountryListUC1" runat="server" EnablePostBack="True" EnableValidation="False"
OnListIndexChanged="CountrySelectedIndexChanged" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="_Governet" runat="server" Text="Governet:"></asp:Label>
</td>
<td>
<uc2:GovernateListUC ID="GovernateListUC1" runat="server" OnListIndexChanged="GovernateSelectedIndexChanged"
Enabled="False" EnablePostBack="True" EnableValidation="False" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="_District" runat="server" Text="District :"></asp:Label>
</td>
<td>
<uc3:DistrictListUC ID="DistrictListUC1" runat="server" Enabled="False" EnablePostBack="True"
EnableValidation="False" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CountryListUC1" EventName="ListIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<table width="22%">
<tr>
<td>
<asp:Label ID="_Gender" runat="server" Text="Gender :"></asp:Label>
</td>
<td>
<asp:DropDownList ID="_ddlGender" runat="server">
<asp:ListItem Value="1">Male</asp:ListItem>
<asp:ListItem Value="2">Female</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Button ID="_btnSaveChanges" runat="server" OnClick="_btnSaveChages_Click" Text="Save changes"
ValidationGroup="signup" />
</td>
<td valign="bottom">
<asp:Button ID="_btnCancel" runat="server" Text="Cancel" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
is the calendar extender an ajax extender or did you mean the asp calendar control? Either way I've tried both in your same situation described and it works. Try posting some code you are using so we can see where the issue lies and be of further assistance.
Edit: here's the code I used from yours. I took out the usercontrols so I could debug the page and it seemed to work. Here's an a screenshot
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="web.test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=70);
opacity: 0.2;
}
.ob_show_panelsholder
{
border: 1px solid #736F6E;
}
.enterzipCalenderCompliant {
PADDING-RIGHT: 10px; FLOAT: left /*No display=inline*/
}
.ajax__calendar_container { z-index : 1000 ; }
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="smtest" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="_pnlShowPersonalData" runat="server">
<table class="style1">
<tr>
<td>
<asp:Image ID="_imgCurrentPP" runat="server" Height="100px" Width="100px" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="First name :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblFirstName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="Last name :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblLastName" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="BirthDate :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblBirthDate" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label10" runat="server" Text="Mobile number :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblMobileNumber" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="Location :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblLocation" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label13" runat="server" Text="Gender :"></asp:Label>
</td>
<td>
<asp:Label ID="_lblGender" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Button ID="_btnEditPersonalData" runat="server" Text="Edit Profile" />
<ajaxToolkit:ModalPopupExtender ID="_btnEditPersonalData_ModalPopupExtender" runat="server" TargetControlID="_btnEditPersonalData" BackgroundCssClass="modalBackground" PopupControlID="_pnlEditPersonalData" CancelControlID="_btnCancel" />
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="_pnlEditPersonalData" runat="server">
<table>
<tr>
<td>
<asp:Label ID="_FirstName" runat="server" Text="First name :" ></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtFirstName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_LastName" runat="server" Text="Last name :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtLastName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_BirthDate" runat="server" Text="Birth date :"></asp:Label>
</td>
<td class="ajax__calendar_container">
<asp:TextBox ID="_txtBirthDate" runat="server"></asp:TextBox>
<ajaxtoolkit:MaskedEditExtender ID="_txtBirthDate_MaskedEditExtender" runat="server" Enabled="True"
TargetControlID="_txtBirthDate" MaskType="Date" ErrorTooltipEnabled="True" MessageValidatorTip="true"
Mask="99/99/9999">
</ajaxtoolkit:MaskedEditExtender>
<div>
<ajaxtoolkit:CalendarExtender ID="_txtBirthDate_CalendarExtender" runat="server" Enabled="True"
PopupButtonID="_btnCalendar" TargetControlID="_txtBirthDate">
</ajaxtoolkit:CalendarExtender>
</div>
<asp:ImageButton ID="_btnCalendar" runat="server" ImageUrl="~/Images/calendar_button_b.jpg" />
<%-- <img alt="Icon" src="~/Images/calendar_button_b.jpg" id="Image1" />--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_ProfilePic" runat="server" Text="Profile picture :"></asp:Label>
</td>
<td>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Label ID="Label1" runat="server"></asp:Label>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="FileUpload1"--%><%-- ErrorMessage="*" ValidationGroup="signup"></asp:RequiredFieldValidator>--%>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.png|.jpg)$"
ControlToValidate="FileUpload1" ErrorMessage="Please Select Png or Jpg File"
ValidationGroup="UploadFile"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_MobileNumber" runat="server" Text="Mobile number :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtMobileNumber" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_Password" runat="server" Text="Password :"></asp:Label>
</td>
<td>
<asp:TextBox ID="_txtPassword" runat="server"></asp:TextBox>
</td>
</tr>
</table>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="_pnlLocation" runat="server">
<table width="21%">
<tr>
<td>
<asp:Label ID="_Country" runat="server" Text="Country :"></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_Governet" runat="server" Text="Governet:"></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="_District" runat="server" Text="District :"></asp:Label>
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
</Triggers>
</asp:UpdatePanel>
<table width="22%">
<tr>
<td>
<asp:Label ID="_Gender" runat="server" Text="Gender :"></asp:Label>
</td>
<td>
<asp:DropDownList ID="_ddlGender" runat="server">
<asp:ListItem Value="1">Male</asp:ListItem>
<asp:ListItem Value="2">Female</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Button ID="_btnSaveChanges" runat="server" Text="Save changes"
ValidationGroup="signup" />
</td>
<td valign="bottom">
<asp:Button ID="_btnCancel" runat="server" Text="Cancel" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
CSS solution that worked for me:
.ajax__calendar_container
{
position :absolute;
z-index : 100003 !important;
}
Make sure to use !important declaration. Without it z-index was always overwrited by higher settings. You should also check z-index in css for popup dialog and it's background.
Related
I have a formview that binds to an Entity Framework datasource using the following code:
Private Sub LoadFormviewData()
Dim ctx As New SNOTEntities
Dim RepCalls = ctx.SNOT_RepCall_view
Dim strSQL As New StringBuilder
strSQL.Append("select * from SNOT_RepCall_view where DateInput >= '")
strSQL.Append(Startdate.ToShortDateString)
strSQL.Append("' and DateInput <= '")
strSQL.Append(EndDate.ToShortDateString)
If IncReviewed = "N" Then
strSQL.Append("' and Reviewed = 'N'")
Else
strSQL.Append("'")
End If
strSQL.Append(" order by IssueID")
Dim calls = RepCalls.SqlQuery(strSQL.ToString)
FormView1.DataSource = calls.ToList
FormView1.DataBind()
If 1 = 1 Then
End If
End Sub
Using the AllowPaging=true I find that it skips every other record when paging. I am new to EF and not that good at ASP.net so forgive me if you require any more info.
I use the IndexChanging and Indexchanged events to save/populate fields that are outside of the formview (too much code to post unless requested)
I have confirmed that the correct amount of records are in 'calls' and that they make it into the Formview datasource. It just skips every other record when paging. Have stared at this code for days. Any help/suggestions welcome.
Formview markup:
<asp:FormView ID="FormView1" runat="server" Height="521px" Width="375px" HorizontalAlign="Left" AllowPaging="True">
<ItemTemplate>
<asp:label ID="HiddenField1" runat="server" Text='<%#Eval("IssueID")%>'/>
<asp:Label ID="Label12" runat="server" Text="<%# FormView1.PageIndex%>"></asp:Label>
<table border="1" style="width: 375px; ">
<tr>
<td><asp:Label ID="Label3" runat="server" CssClass="LabelBold" Text="Call Date:"></asp:Label>
<asp:Label ID="lblCallDate" runat="server" CssClass="LabelNormal" Text='<%#Eval("CallDate", "{0:dd/M/yyyy}")%>'></asp:Label>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" runat="server" CssClass="LabelBold" Text='Input Date:'></asp:Label>
<asp:Label ID="lblInputDate" runat="server" CssClass="LabelNormal" Text='<%#Eval("DateInput", "{0:dd/M/yyyy}")%>'></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label11" runat="server" CssClass="LabelBold" Text='<%#Eval("IssueTypeName")%>'></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblStore" runat="server" CssClass="LabelBold" Text='<%#Eval("StoreName")%>'></asp:Label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label6" runat="server" CssClass="LabelBold" Text="Rep:"></asp:Label>
<asp:Label ID="lblRep" runat="server" CssClass="LabelNormal" Text='<%#Eval("InputByName")%>'></asp:Label>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="lblCust" runat="server" CssClass="LabelBold" Text='<%#Eval("CustName")%>'></asp:Label>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" CssClass="LabelBold" Text="Vendor:"></asp:Label>
<asp:Label ID="lblVendor" runat="server" CssClass="LabelNormal" Text='<%#Eval("Vendor")%>'></asp:Label>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" CssClass="LabelBold" Text="Rep Notes:"></asp:Label>
<br />
<asp:Label ID="lblDetails" runat="server" CssClass="LabelNormal" Text='<%#Eval("Details")%>'></asp:Label>
</td>
<td> </td>
</tr>
<tr>
<td>
<asp:Label ID="Label4" runat="server" CssClass="LabelBold" Text="Reviewer Notes:"></asp:Label>
<br />
<asp:TextBox ID="txtRevNotes" runat="server" Height="130px" TextMode="MultiLine" Width="345px" Text='<%#Eval("ReviewerNotes")%>' ReadOnly="True"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</ItemTemplate>
<EmptyDataTemplate>
There is nothing to see here.
</EmptyDataTemplate>
<PagerSettings Position="TopAndBottom" Mode="NumericFirstLast" />
<%-- <PagerTemplate>
<table style="border: thin solid #000000; width: 375px;">
<tr>
<td style="width: 80px" >
<%-- <asp:linkButton
id="lnkPrevious"
Text="Prev"
CommandName="Page"
CommandArgument="Prev"
Runat="server" />
</td>
<td style="font-family: Arial, Helvetica, sans-serif; text-align: center; width: 215px">
<asp:Label ID="Label8" runat="server" Text="<%# FormView1.PageCount - FormView1.PageIndex -1%>"></asp:Label>
more to go
</td>
<td style="width: 80px">
<asp:linkButton
id="lnkNext"
Text="Next"
CommandName="Page"
CommandArgument="Next"
Runat="server" />
</td>
</tr>
</table>
</PagerTemplate>--%>
</asp:FormView>
The pagertemplate is commented out as part of my testing leaving just the default version.
Hi everyone thx for trying to help.
I have a ListView with a fixed y header.
The header of my ListView is actually another table formatted to fit the ListView Columns.
I have a JScrollPane and a javascript in order to keep the header fixed at top and to keep it aligned with the ListView columns when I scroll on X Axis.
All fine. Except for the part where i start scrolling from left to right, The header background color is green(as programmed in the css file) only for the visible part of the Table, meaning that as soon as i scroll to the right to see the remaining columns I can notice that the header table isnt colored anymore, its transparent.
Here is my css:
.listeResultat
{
max-height: 800px;
height: 800px;
overflow:hidden ;
border: 1px solid black;
background: #F3F6FA;
}
#parentFixed
{
height:800px;
background-color:#cccccc;
overflow:auto;
}
.headerFixed{
color:White;
background-color:green;
font-size:20px;
position:static;
z-index:222;
}
.headerFixed table td{
border: 1px solid #000000 ;
min-width: 150px;
}
.wrapperfixed{
height:600px;
font-size:20px;
}
/*Celui la ici si on voulais un header fixe vertical aligné a gauche*/
.wrapperfixed .lefter{
float:left;
width:100px;
height:800px;
background-color:red;
position:relative;
}
.wrapperfixed .content{
float:left;
}
.wrapperfixed .content table td{
border: 1px solid #000000 ;
min-width : 150px;
}
.wrapperfixed .content table th{
border: 1px solid #000000 ;
min-width: 150px;
}
and this is my asp page with the script and everything
<div class="listeResultat">
<!--début tableau des résultats-->
<div id="parentFixed">
<div class="headerFixed">
<table id="tableHeader">
<tr>
<td><asp:LinkButton ID="Q" runat="server"><%= getCellText("Q")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="W" runat="server"><%= getCellText("W")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="E" runat="server"><%= getCellText("E")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="R" runat="server"><%= getCellText("R")%></asp:LinkButton></td>
<td><asp:LinkButton ID="T" runat="server"><%= getCellText("T")%></asp:LinkButton></td>
<td><asp:LinkButton ID="Y" runat="server"><%= getCellText("Y")%></asp:LinkButton></td>
<td><asp:LinkButton ID="U" runat="server"><%= getCellText("U")%></asp:LinkButton></td>
<td><asp:LinkButton ID="I" runat="server"><%= getCellText("I")%></asp:LinkButton></td>
<td><asp:LinkButton ID="O" runat="server"><%= getCellText("O")%></asp:LinkButton></td>
<td><asp:LinkButton ID="P" runat="server"><%= getCellText("P")%></asp:LinkButton></td>
<td><asp:LinkButton ID="S" runat="server"><%= getCellText("S")%></asp:LinkButton></td>
<td><asp:LinkButton ID="L4" runat="server"><%= getCellText("L4")%></asp:LinkButton></td>
<td><asp:LinkButton ID="L5" runat="server"><%= getCellText("L5")%></asp:LinkButton></td>
<td><asp:LinkButton ID="A" runat="server"><%= getCellText("A")%></asp:LinkButton></td>
<td><asp:LinkButton ID="D" runat="server"><%= getCellText("D")%></asp:LinkButton></td>
<td><asp:LinkButton ID="F" runat="server"><%= getCellText("F")%></asp:LinkButton></td>
<td><asp:LinkButton ID="G" runat="server"><%= getCellText("G")%></asp:LinkButton></td>
<td><asp:LinkButton ID="H" runat="server"><%= getCellText("H")%></asp:LinkButton></td>
<td><asp:LinkButton ID="J" runat="server"><%= getCellText("J")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="K" runat="server"><%= getCellText("K")%></asp:LinkButton></td>
<td><asp:LinkButton ID="L" runat="server"><%= getCellText("L")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="Z" runat="server"><%= getCellText("Z")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="X" runat="server"><%= getCellText("X")%></asp:LinkButton></td>
<td> <asp:LinkButton ID="C" runat="server"><%= getCellText("C")%></asp:LinkButton></td>
<td><asp:LinkButton ID="V" runat="server"><%= getCellText("V")%></asp:LinkButton></td>
<td><asp:LinkButton ID="B" runat="server"><%= getCellText("B")%></asp:LinkButton></td>
<td><asp:LinkButton ID="N" runat="server"><%= getCellText("N")%></asp:LinkButton></td>
<td><asp:LinkButton ID="M" runat="server"><%= getCellText("M")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QQ" runat="server"><%= getCellText("QQ")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QW" runat="server"><%= getCellText("QW")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QL" runat="server"><%= getCellText("QL")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QE" runat="server"><%= getCellText("QE")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QR" runat="server"><%= getCellText("QR")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QT" runat="server"><%= getCellText("QT")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QY" runat="server"><%= getCellText("QY")%></asp:LinkButton></td>
<td><asp:LinkButton ID="QU" runat="server"><%= getCellText("QU")%></asp:LinkButton></td>
<td><asp:LinkButton ID="COM" runat="server"><%= getCellText("COM")%></asp:LinkButton></td>
</tr>
</table>
</div><%--FIN HEADER FIXED--%>
<%--Wrapper FIXED--%>
<div class="wrapperfixed">
<div class="content"><%--Content FIXED--%>
<table>
<asp:ListView ID="ListView1" runat="server" EnableEventValidation="true">
<ItemTemplate>
<tr style="background-color: <%# BgColor(Eval("A"))%>">
<td width="106px">
<asp:Label runat="server" ID="lb_LB1"><%# Eval("Q")%></asp:Label>
</td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB2"><%# Eval("W")%></asp:Label>
</td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB3"><%# Eval("E")%></asp:Label></td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB4"><%# Eval("R")%></asp:Label></td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB5"><%# Eval("T")%></asp:Label></td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB6"><%# Eval("Y")%></asp:Label></td>
<td width="106px">
<asp:Label runat="server" ID="lb_LB7"><%# Eval("U")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB8"><%# Eval("I")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB9"><%# Eval("O")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB10"><%# Eval("P")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB12"><%# Eval("S")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="Label4"><%# Eval("L4")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="Label5"><%# Eval("L5")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB11"><a href="Reservation.aspx?<%# getLink(Eval("A"), Eval("Q") , Eval("F"))%>"><%# Eval("A")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB13"><%# Eval("D")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB14"><%# Eval("F")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB15"><%# Eval("G")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB16"><%# Eval("H")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB17"><%# Eval("J")%></asp:Label></td>
<td>
<asp:Label runat="server" ID="lb_LB18"><%# Eval("K")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB19"><%# Eval("L")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB20"><%# Eval("Z")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB21"><%# Eval("X")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB22"><%# Eval("C")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB23"><%# Eval("V")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB24"><%# Eval("B")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB25"><%# Eval("N")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB26"><%# Eval("M")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB27"><%# Eval("QQ")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB28"><%# Eval("QW")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB29"><%# Eval("QL")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB30"><%# Eval("QE")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB31"><%# Eval("QR")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB32"><%# Eval("QT")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB33"><%# Eval("QY")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB34"><%# Eval("QU")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB35"><%# Eval("COM")%></asp:Label><%--Comments--%>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr style="background-color: <%# BgColor(Eval("A"))%>">
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB1"><%# Eval("Q")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB2"><%# Eval("W")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB3"><%# Eval("E")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB4"><%# Eval("R")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB5"><%# Eval("T")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB6"><%# Eval("Y")%></asp:Label>
</td>
<td style="width:106px;">
<asp:Label runat="server" ID="lb_LB7"><%# Eval("U")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB8"><%# Eval("I")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB9"><%# Eval("O")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB10"><%# Eval("P")%></asp:Label>
</td>
<%--<td><asp:Label runat="server" ID="Label1"><%# Eval("A")%></asp:Label></td>--%>
<td>
<asp:Label runat="server" ID="lb_LB12"><%# Eval("S")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="Label6"><%# Eval("L4")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="Label7"><%# Eval("L5")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB11"><%# Eval("A")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB13"><%# Eval("D")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB14"><%# Eval("F")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB15"><%# Eval("G")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB16"><%# Eval("H")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB17"><%# Eval("J")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB18"><%# Eval("K")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB19"><%# Eval("L")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB20"><%# Eval("Z")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB21"><%# Eval("X")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB22"><%# Eval("C")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB23"><%# Eval("V")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB24"><%# Eval("B")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB25"><%# Eval("N")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB26"><%# Eval("M")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB27"><%# Eval("QQ")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB28"><%# Eval("QW")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB29"><%# Eval("QL")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB30"><%# Eval("QE")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB31"><%# Eval("QR")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB32"><%# Eval("QT")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB33"><%# Eval("QY")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB34"><%# Eval("QU")%></asp:Label>
</td>
<td>
<asp:Label runat="server" ID="lb_LB35"><%# Eval("COM")%> </asp:Label><%--Comments--%>
</td>
</tr>
</AlternatingItemTemplate>
</asp:ListView>
</table>
</div><%--FIN CONTENT FIXED--%>
</div><%--FIN WRAPPER FIXED--%>
<div class="scrollarea"></div><%--Pour activer le javascript du jscrollpane--%>
</div><%--Fin ParentFixed--%>
<br/><br/>
<!-- styles pour le jScrollPane -->
<link type="text/css" href="Styles/jquery.jscrollpane.css" rel="stylesheet" media="all" />
<!-- jQuery direct de google -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="Scripts/jquery.mousewheel.js"></script>
<!-- the jScrollPane script -->
<script type="text/javascript" src="Scripts/jquery.jscrollpane.min.js"></script>
<%--Script qui ajoute un event lors de l'utilisation des scrollbar--%>
<script type="text/javascript">
$(document).ready(function () {
$('#parentFixed')
.bind('jsp-scroll-y',
function (event, scrollPositionY, isAtTop, isAtBottom) {
$(".headerFixed").css("top", scrollPositionY);
}
)
.bind('jsp-scroll-x',
function (event, scrollPositionX, isAtLeft, isAtRight) {
$(".lefter").css("left", scrollPositionX);
}
)
.jScrollPane();
});
// alert('I was invoked at the end of the script'); //test pour voir si le scripte roule
</script>
</div><%--FIN Div listeResultats--%>
<%--FIN PANEL DE LA LISTE DES RESULTATS--%>
Again I found the answer by myself. I have to tell my jquery script that each time the scroll right or left is used to paint the table background
This would be the needed line
$('#tableHeader').css('background-color', '#556d80');
This is the whole script
<script type="text/javascript">
$(document).ready(function () {
$('#parentFixed')
.bind('jsp-scroll-y',
function (event, scrollPositionY, isAtTop, isAtBottom) {
$(".headerFixed").css("top", scrollPositionY);
}
)
.bind('jsp-scroll-x',
function (event, scrollPositionX, isAtLeft, isAtRight) {
$(".lefter").css("left", scrollPositionX);
// $('#tableHeader').css('background-color', '#556d80');
$('#tableHeader').css({ 'background-image': 'url(Styles/grd_head.png)' });
}
)
.jScrollPane();
});
// alert('I was invoked at the end of the script'); //TRACE
I have a drop-down list where i select value and when i select a value from it, a form will appear. In that form i have four drop-down list of currencies so when i select .UK in my Drop-down list all four dropdown list's in the form show GBP,and when i select .CA it show CAN in four drop-down list's present in the form. how can i do that?
My first drop-dwon list from where i select value to fill form:
<asp:DropDownList ID="ddlPortal" runat="server" AutoPostBack="True"
onselectedindexchanged="ddlPortal_SelectedIndexChanged">
<asp:ListItem>TRAVELONG</asp:ListItem>
<asp:ListItem>ONETRAVEL</asp:ListItem>
<asp:ListItem>.UK</asp:ListItem>
<asp:ListItem>.CA-YYZ</asp:ListItem>
<asp:ListItem>.CA-YVR</asp:ListItem>
</asp:DropDownList>
Dropdown list where i want changes:
<asp:ValidationSummary ID="vdm" runat="server" ForeColor="Red" />
<table class="style1">
<tr>
<td class="style13">
<asp:Label ID="lblTid" runat="server" Text="TID"></asp:Label>
</td>
<td class="style5">
<asp:TextBox ID="tbTid" runat="server"></asp:TextBox>
</td>
<td class="style4">
<asp:RequiredFieldValidator ID="rfvTid" runat="server"
ControlToValidate="tbTid" ErrorMessage="Enter Tid" Font-Bold="True"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style5">
<asp:Label ID="lblUnusedTicketAmount" runat="server"
Text="Unused Ticket Amount"></asp:Label>
</td>
<td class="style11">
<asp:TextBox ID="tbUnusedTicketAmount" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvUnusedTicketAmount" runat="server"
ControlToValidate="tbUnusedTicketAmount" ErrorMessage="Enter Amount"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:DropDownList ID="ddlUnusedAmount" runat="server"
onselectedindexchanged="ddlUnusedAmount_SelectedIndexChanged">
<asp:ListItem>USD</asp:ListItem>
<asp:ListItem>CAD</asp:ListItem>
<asp:ListItem>GBP</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style14">
<asp:Label ID="lblPNR" runat="server" Text="PNR"></asp:Label>
</td>
<td class="style9">
<asp:TextBox ID="tbPNR" runat="server"></asp:TextBox>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="rfvPNR" runat="server"
ControlToValidate="tbPNR" ErrorMessage="Enter PNR" Font-Bold="True"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style9">
<asp:Label ID="lblAirlinePenality" runat="server" Text="Airline Penality"></asp:Label>
</td>
<td class="style12">
<asp:TextBox ID="tbAirlinePenality" runat="server"></asp:TextBox>
</td>
<td class="style10">
<asp:RequiredFieldValidator ID="rfvAirlinePenality" runat="server"
ControlToValidate="tbAirlinePenality" ErrorMessage="Enter Penality"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style10">
<asp:DropDownList ID="ddlAirlinePenality" runat="server">
<asp:ListItem>USD</asp:ListItem>
<asp:ListItem>CAD</asp:ListItem>
<asp:ListItem>GBP</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style13">
<asp:Label ID="lblTicketNumber" runat="server" Text="Ticket Number"></asp:Label>
</td>
<td class="style5">
<asp:TextBox ID="tbTicketNumber" runat="server"></asp:TextBox>
</td>
<td class="style4">
<asp:RequiredFieldValidator ID="rfvTicketNumber" runat="server"
ControlToValidate="tbTicketNumber" ErrorMessage="Enter ESAC" Font-Bold="True"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style5">
<asp:Label ID="lblNetRefundProcess" runat="server" Text="Net Refund Process"></asp:Label>
</td>
<td class="style11">
<asp:TextBox ID="tbNetRefundProcess" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvNetRefundProcess" runat="server"
ControlToValidate="tbNetRefundProcess" ErrorMessage="RequiredFieldValidator"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:DropDownList ID="ddlNetRefundProcess" runat="server">
<asp:ListItem>USD</asp:ListItem>
<asp:ListItem>CAD</asp:ListItem>
<asp:ListItem>GBP</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style13">
<asp:Label ID="lblESACCode" runat="server" Text="ESAC Code"></asp:Label>
</td>
<td class="style5">
<asp:TextBox ID="tbESACCode" runat="server"></asp:TextBox>
</td>
<td class="style4">
<asp:RequiredFieldValidator ID="rfvESACCode" runat="server"
ControlToValidate="tbESACCode" ErrorMessage="Enter ESAC code" Font-Bold="True"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style5">
<asp:Label ID="lblRefundableCommision" runat="server"
Text="Refundable Commission"></asp:Label>
</td>
<td class="style11">
<asp:TextBox ID="tbRefundableCommision" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvRefundableCommission" runat="server"
ControlToValidate="tbRefundableCommision" ErrorMessage="RequiredFieldValidator"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td>
<asp:DropDownList ID="ddlRefundableCommission" runat="server">
<asp:ListItem>USD</asp:ListItem>
<asp:ListItem>CAD</asp:ListItem>
<asp:ListItem>GBP</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="style13">
<asp:Label ID="lblWaiverCode" runat="server" Text="Waiver Code"></asp:Label>
</td>
<td class="style5">
<asp:TextBox ID="tbWaiverCode" runat="server"></asp:TextBox>
</td>
<td class="style4">
<asp:RequiredFieldValidator ID="rfvWaiverCode" runat="server"
ControlToValidate="tbWaiverCode" ErrorMessage="Enter Waiver Code"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style5">
<asp:Label ID="lblCouponRefunded" runat="server" Text="Coupon Refunded"></asp:Label>
</td>
<td class="style11">
<asp:TextBox ID="tbCouponRefund" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvCouponRefunded" runat="server"
ControlToValidate="tbCouponRefund" ErrorMessage="Enter Coupon Refund"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td>
</td>
</tr>
<tr>
<td class="style13">
<asp:Label ID="Label7" runat="server" Text="Remarks"></asp:Label>
</td>
<td class="style5">
<asp:TextBox ID="tbRemarks" runat="server" TextMode="MultiLine"></asp:TextBox>
</td>
<td class="style4">
<asp:RequiredFieldValidator ID="rfvRemarks" runat="server"
ControlToValidate="tbRemarks" ErrorMessage="Enter Remarks" Font-Bold="True"
ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td class="style5">
<asp:Label ID="lblRefundType" runat="server" Text="Refund Type"></asp:Label>
</td>
<td class="style11">
<asp:DropDownList ID="ddlRefundType" runat="server">
<asp:ListItem>Full</asp:ListItem>
<asp:ListItem>Partial</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvRefundType" runat="server"
ControlToValidate="ddlRefundType" ErrorMessage="Select Refund Type"
Font-Bold="True" ForeColor="Red">*</asp:RequiredFieldValidator>
</td>
<td>
</td>
</tr>
<tr>
<td class="style13" colspan="7">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Submit" />
</td>
</tr>
</table>
Thanks in advance..
I am using ajax tab container with update panel and file uploader
fileuploaderId.HasFille always blank.
Here is my html code
<cc1:TabPanel ID="tour" runat="server">
<HeaderTemplate>
<span class="label_Tag_big">भ्रमण (Tours)</span></HeaderTemplate>
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<center class="control_bg">
<table width="75%" cellspacing="1">
<tr>
<td style="background-color: #996666">
<table width="100%" align="center" cellpadding="0" cellspacing="1">
<tr class="form_heading">
<td colspan="2">
<asp:Label ID="lbl" runat="server" Text="भ्रमण (Tours)"></asp:Label>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
विभागाध्यक्ष / अधिकारी का पद नाम
</td>
<td>
designation location, department
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
<asp:Label ID="lblCurrentTT" runat="server"></asp:Label>
का लक्ष्य
</td>
<td>
<asp:Label ID="lblTargetT" runat="server"></asp:Label>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
<asp:Label ID="lblCurrentTA" runat="server"></asp:Label>
की लक्ष्य प्राप्ति
</td>
<td>
<asp:Label ID="lblAchivedT" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="form_sub_heading" colspan="2" align="left">
भ्रमण का विवरण (Tours details)
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td width="45%">
दौरे का स्थान
</td>
<td width="55%">
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td width="50%">
<asp:DropDownList ID="ddlLocLevel" runat="server" OnSelectedIndexChanged="ddlLocLevel_SelectedIndexChanged"
AutoPostBack="True" Width="200px" />
<asp:RequiredFieldValidator ID="rfqLocLevel" runat="server" InitialValue="0" ControlToValidate="ddlLocLevel"
Display="None" ErrorMessage="दौरे का स्थान चुनें " ValidationGroup="tour"></asp:RequiredFieldValidator>
</td>
<td width="50%">
<asp:DropDownList ID="ddlLocation" runat="server" OnSelectedIndexChanged="ddlLocation_SelectedIndexChanged"
AutoPostBack="True" Width="200px">
<asp:ListItem Text="-- चुनें --" Value="0"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfqLocation" runat="server" InitialValue="0" ControlToValidate="ddlLocation"
Display="None" ErrorMessage="-- चुनें --" ValidationGroup="tour" Enabled="false"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="ddlSubDistrict" runat="server" OnSelectedIndexChanged="ddlSubDistrict_SelectedIndexChanged"
AutoPostBack="True" Width="200px">
<asp:ListItem Text="-- तहसील चुनें --" Value="0"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfqddlSubDistrict" runat="server" InitialValue="0"
ControlToValidate="ddlSubDistrict" Display="None" ErrorMessage="-- चुनें --"
ValidationGroup="tour" Enabled="false"></asp:RequiredFieldValidator>
</td>
<td>
<asp:DropDownList ID="ddlPoliceStation" runat="server" Width="200px">
<asp:ListItem Text="-- पुलिस थाना चुनें --" Value="0"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfqddlPoliceStation" runat="server" InitialValue="0"
ControlToValidate="ddlPoliceStation" Display="None" ErrorMessage="-- पुलिस थाना चुनें --"
ValidationGroup="tour" Enabled="false"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
<asp:Label ID="lblTourStartDate" runat="server" Text="दौरे की तिथि "></asp:Label>
</td>
<td>
<asp:TextBox ID="txtTourStartDate" runat="server" Width="25%" CssClass="date" onkeypress="return false;"
onPaste="return false;"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtTourStartDate"
Format="dd/MM/yyyy">
</cc1:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTourStartDate"
ErrorMessage="दौरे की आरम्भिक तिथि डाले" ValidationGroup="tour" Display="None"></asp:RequiredFieldValidator>
से
<asp:TextBox ID="txtTourEndDate" runat="server" Width="25%" onkeypress="return false;"
onPaste="return false;"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtTourEndDate"
Format="dd/MM/yyyy">
</cc1:CalendarExtender>
तक
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtTourEndDate"
ErrorMessage="दौरे की समाप्ति तिथि डाले" ValidationGroup="tour" Display="None"></asp:RequiredFieldValidator>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
दौरे के दौरान निरीक्षण किया गया ?
</td>
<td>
<asp:RadioButtonList ID="rdbtnInsp" runat="server" RepeatDirection="Horizontal" AutoPostBack="true"
OnSelectedIndexChanged="rdbtnInsp_SelectedIndexChanged">
<asp:ListItem Text="नही" Value="0"></asp:ListItem>
<asp:ListItem Text="हाँ" Value="1"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
निरीक्षण नही किये जाने की स्थिति मे टिप्पणी
</td>
<td>
<asp:TextBox ID="txtConIns" runat="server" TextMode="MultiLine" MaxLength="4000"
Enabled="false" Rows="3" Width="97%"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfqConIns" runat="server" ControlToValidate="txtConIns"
ValidationGroup="tour" ErrorMessage="निरीक्षण नही किये जाने की स्थिति मे टिप्पणी डाले "
Enabled="false" Display="None">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
दौरे के दौरान रात्री विश्राम किया गया ?
</td>
<td>
<asp:RadioButtonList ID="rdbtnNHault" runat="server" RepeatDirection="Horizontal"
AutoPostBack="true" OnSelectedIndexChanged="rdbtnNHault_SelectedIndexChanged">
<asp:ListItem Text="नही" Value="0"></asp:ListItem>
<asp:ListItem Text="हाँ" Value="1"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
रात्री विश्राम नही किये जाने की स्थिति मे टिप्पणी
</td>
<td>
<asp:TextBox ID="txtConNHault" runat="server" TextMode="MultiLine" MaxLength="4000"
Enabled="false" Rows="3" Width="97%"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfqConNHault" runat="server" ControlToValidate="txtConNHault"
Display="None" ValidationGroup="tour" ErrorMessage="रात्री विश्राम नही किये जाने की स्थिति मे टिप्पणी डाले "
Enabled="false">
</asp:RequiredFieldValidator>
<asp:ValidationSummary ID="vsTour" runat="server" ShowSummary="False" ShowMessageBox="true"
ValidationGroup="tour" />
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td>
<asp:Label ID="Label8" runat="server" Text="संलग्न निरीक्षण रिपोर्ट "></asp:Label>
</td>
<td>
<asp:FileUpload ID="fuTourReport" runat="server" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Only pdf file is allowed!"
ValidationExpression="^.+(.pdf|.PDF)$" ControlToValidate="fuTourReport" Display="None"
ValidationGroup="nhalt"> </asp:RegularExpressionValidator>
</td>
</tr>
<tr class="bgColor" align="left" valign="top">
<td colspan="2" align="center">
<asp:Button ID="btnSaveTour" runat="server" Text="Submit" ValidationGroup="tour"
OnClick="btnSaveTour_Click" CssClass="savetour" />
<asp:Button ID="btnCancelTour" runat="server" Text="Cancel" CausesValidation="False" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<center style="padding-top: 5px">
<asp:GridView ID="grdTours" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataKeyNames="tourId" Width="100%" OnPageIndexChanging="grdTours_PageIndexChanging"
OnRowCommand="grdTours_RowCommand">
<Columns>
<asp:BoundField DataField="Location_NameH" HeaderText="दौरे का स्थान " />
<asp:BoundField DataField="tourStartDate" HeaderText="आरम्भिक तिथि" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField DataField="tourEndDate" HeaderText="समाप्ति की तिथि" DataFormatString="{0:dd/MM/yyyy}" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkinsdetail" runat="server" Text="Detail" CommandName="insdetail"
CommandArgument='<%#Eval("tourId")%>'></asp:LinkButton></ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</center>
</center>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
I have already tried this
<Triggers>
<asp:PostBackTrigger ControlID="clickButton" />
</Triggers>
and
protected void Page_Init(object sender, EventArgs e)
{
PostBackTrigger trig = new PostBackTrigger();
trig.ControlID = btnSaveTour.UniqueID;
UpdatePanel1.Triggers.Add(trig);
}
but no luck ....
Unfortunately, the FileUpload control doesn't work inside an UpdatePanel
You don't have many options really other than removing the UpdatePanel or looking at working around it by using something like the AsyncFileUpload control
See this answer for some more detail
Dave
I am using modelpopupextender in asp.net and this code is working window is popup sucessfuly but cancel button can't work; can anybody tell me why?
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp"
%>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Button ID="buttonOpen" runat="server" style="display:none" ></asp:Button>
<asp:Panel ID="Panel3" runat="server" BackColor="#99CCFF" Height="269px" Width="350px"
style="display:none">
<table width="100%" style="border:Solid 3px #D55500; width:100%; height:100%"
cellpadding="0" cellspacing="0">
<tr style="background-color:#333399">
<td colspan="2" style=" height:10%; color:White; font-weight:bold; font-size:larger"
align="center">Time Details</td>
</tr>
<tr>
<td>
<asp:Label ID="Label19" runat="server" Text="Time From"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label20" runat="server" Text="Time To"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label21" runat="server" Text="Number of Slots"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Add" />
</td>
<td>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" />
</td>
</tr>
</table>
</asp:Panel>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" OnCancelScript="btnCancel" PopupControlID="panel3" TargetControlID="buttonOpen" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>
You need to set the CancelControlID property, not the OnCancelScript property (unless you want to execute a script after the cancel button is clicked). So for your scenario, do this:
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" CancelControlID="btnCancel" PopupControlID="panel3" TargetControlID="buttonOpen" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender>