I'm having a bit of a problem regarding RadioButton CheckedChanged. I have three radio buttons, a RadDatePicker, a textbox and a button. I'm simply trying to search data using the value given in the textbox depending on the Radio Button selected. My problem is with the third Radio Button, which is "dateCreated". I want to make the RadDatePicker enabled when the third Radio Button is selected. I also need to do this in code behind and not using Javascript or any other method. Please Help.
Here's my code :
.aspx
<table>
<tr>
<td style="font-family: Calibri; font-weight: 400; font-style: normal; text-transform: none; color: #FFFFFF;" colspan="2">
</td>
<td class="style19" align="left" colspan="2" style="font-family: Calibri; font-weight: 400; font-style: normal; text-transform: none; color: #FFFFFF">
<asp:Label ID="searchTitle" runat="server" CssClass="style47" Font-Bold="False" Font-Names="Traditional Arabic" Font-Size="Medium" Font-Strikeout="False" ForeColor="#006699" Style="font-size: x-large; font-family: 'Myriad Pro'" Text="Search Non-Disclosure Document"></asp:Label>
</td>
</tr>
</table>
<table style="font-family: Calibri">
<tr>
<td class="style75">
</td>
</tr>
<tr>
<td class="style81">
</td>
<td class="style84">
</td>
<tr>
<td bgcolor="#EEF4FD" class="style77">
<asp:Label ID="ndaSearchTitle" runat="server" Text="Search NDA by :"></asp:Label>
</td>
<td bgcolor="#EEF4FD" class="style87">
</td>
<td bgcolor="#EEF4FD" class="style83">
<asp:RadioButton ID="nameSearch" runat="server" Checked="true" GroupName="searchRad" Text="Company Name" />
</td>
</tr>
<tr>
<td bgcolor="#EEF4FD" class="style77">
</td>
<td bgcolor="#EEF4FD" class="style87">
</td>
<td bgcolor="#EEF4FD" class="style83">
<asp:RadioButton ID="countrySearch" runat="server" GroupName="searchRad" Text="Country Incorperated" />
</td>
</tr>
<tr>
<td bgcolor="#EEF4FD" class="style77">
</td>
<td bgcolor="#EEF4FD" class="style87">
</td>
<td bgcolor="#EEF4FD" class="style83">
<asp:RadioButton ID="dateSearch" runat="server" GroupName="searchRad" Text="Date Created" oncheckedchanged="dateSearch_CheckedChanged" />
<telerik:RadDatePicker ID="RadDatePicker2" runat="server"
DateInput-DateFormat="dd-MM-yyyy" Skin="Default" style="margin-left: 0px" Width="45%" Enabled="false">
</telerik:RadDatePicker>
</td>
</tr>
<tr>
<td bgcolor="#93B4DF" class="style3" colspan="3" style="font-family: Calibri; font-size: large; font-weight: normal; height:20px;">
</td>
</tr>
<tr>
<td bgcolor="#EEF4FD" class="style77">
</td>
<td bgcolor="#EEF4FD" class="style87">
</td>
<td bgcolor="#EEF4FD" class="style83">
<asp:TextBox ID="ndaSearchBox" runat="server" Width="350px"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" />
</td>
</tr>
</tr>
</table>
aspx.cs
protected void dateSearch_CheckedChanged(object sender, EventArgs e)
{
if (dateSearch.Checked == true)
{
RadDatePicker2.Enabled = true;
}
else
{
RadDatePicker2.Enabled = false;
}
}
try adding autopostback attribute alos
<asp:RadioButton ID="dateSearch" runat="server" GroupName="searchRad" Text="Date Created" oncheckedchanged="dateSearch_CheckedChanged" autopostback="true" />
Related
I have checkboxlist within a table I am using. The checklist I need to line up with checkboxes in the second column. The spacing of each row of the textboxes(second row) is 26px. I can not find how to do spacing between items on checkbox list. Setting margins only does the outside of the list not items within.
I tried cellspacing but I cant get it quite lined up.
Update 2
<td style="vertical-align: top" rowspan="7" Width="175" style="padding: 0;">
<asp:CheckBoxList ID="cbtasklist" runat="server" CssClass="radiobutton">
<asp:ListItem Value="Task 1">Task 1</asp:ListItem>
<asp:ListItem Value="Task 2">Task 2</asp:ListItem>
<asp:ListItem Value="Task 3">Task 3</asp:ListItem>
<asp:ListItem>Task 4</asp:ListItem>
<asp:ListItem Value="Task 5">Task 5</asp:ListItem>
<asp:ListItem Value="Other1">Other</asp:ListItem>
<asp:ListItem Value="Other2">Other</asp:ListItem>
</asp:CheckBoxList>
</td>
<td class="auto-style187" style="vertical-align: top" colspan="2">
</td>
.auto-style187 {
height: 26px;
width: 357px;
}
Update 3:
Would it be easier to do a checkbox for each line so I can use the same CSS as the other column?
The reason for the checkbox list is for validation that 1 must be selected.
I hope you are looking for this
<form id="form1" runat="server">
<div style="width: 100%">
<table class="auto-style1">
<tr>
<td class="auto-style3">
<asp:CheckBoxList ID="CheckBoxList1" runat="server" Height="163px">
<asp:ListItem>a</asp:ListItem>
<asp:ListItem>b</asp:ListItem>
<asp:ListItem>c</asp:ListItem>
<asp:ListItem>d</asp:ListItem>
<asp:ListItem>e</asp:ListItem>
<asp:ListItem>f</asp:ListItem>
</asp:CheckBoxList>
</td>
<td class="auto-style8">
<table class="auto-style1">
<tr>
<td class="auto-style5">
<asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
</td>
<td>aaaa</td>
</tr>
<tr>
<td class="auto-style6">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td class="auto-style7">aaaa</td>
</tr>
<tr>
<td class="auto-style5">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td>aaaa</td>
</tr>
<tr>
<td class="auto-style10">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td class="auto-style11">aaaa</td>
</tr>
<tr>
<td class="auto-style12">
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
<td class="auto-style13">aaaa</td>
</tr>
<tr>
<td class="auto-style5">
<asp:TextBox ID="TextBox6" runat="server" OnTextChanged="TextBox6_TextChanged"></asp:TextBox>
</td>
<td>aaaa</td>
</tr>
</table>
</td>
<td class="auto-style4"></td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td class="auto-style9"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td class="auto-style9"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style14"></td>
<td class="auto-style15"></td>
<td class="auto-style11"></td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td class="auto-style9"> </td>
<td> </td>
</tr>
</table>
</div>
</form>
see the image
I just took table inside a table .You can just remove the unwanted column as your desire
don't forget to edit the text box lineup its up to you
why don't you try with this on your CSS:
checkbox { padding-bottom: 10px; }
I have an HTML table that is generated for printing purposes. It has a Repeater that populates from a DataSet built from SQL; so the total row count is unknown.
The issue is when the page is printed, table rows that are supposed to be together are separated between the end of the previous page and the beginning of the next page. I need to insert a Page-Break to keep the table rows together. With most efforts made found from Google Searches, the table row for the "Standard" keeps getting pushed to the next page. Other methods just create 10+ blank pages first then the table with "Standard" on the next pages.
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
body {
font-family: Arial;
font-size: 10pt;
}
table {
border-collapse: collapse;
}
.alignL {
text-align: left;
}
.alignC {
text-align: center;
}
.alignR {
text-align: right;
}
.border1 {
border-color: black;
border-style: groove;
border-width: 2px;
white-space: nowrap;
}
.border1L {
border-color: black;
border-style: groove;
border-width: 2px;
border-right: none;
height: 35px;
font-size: 12pt;
}
.border1R {
background-image: url(../_images/LgtGrey.png);
border-color: black;
border-style: groove;
border-width: 2px;
font-size: 12pt;
border-left: none;
}
.border2 {
border-color: black;
border-style: groove;
border-width: 2px;
border-bottom: none;
width: 60px;
}
.border3 {
border-color: black;
border-style: groove;
border-width: 2px;
border-top: none;
width: 60px;
}
.borderBottom {
border-bottom-color: black;
border-bottom-style: groove;
border-bottom-width: 2px;
}
.center {
margin-right: auto;
margin-left: auto;
width: 11in;
}
</style>
<style media="print" type="text/css">
#page {
size: landscape;
}
#media print {
thead {
display: table-header-group;
}
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="page">
<div class="center">
<table class="alignC" style="width: 90%">
<thead>
<tr>
<th> </th>
</tr>
<tr>
<th colspan="16" class="alignC">
<h3 class="alignC">Technical Evaluation Worksheet</h3>
</th>
</tr>
<tr>
<th> </th>
</tr>
<tr>
<th> </th>
<th colspan="2" class="border1L alignR">
<asp:Label ID="Label1" runat="server" Text="Model: " Font-Bold="true" /></th>
<th colspan="2" class="border1R alignC">
<asp:Label ID="lblModel" runat="server" /></th>
<th> </th>
<th colspan="2" class="border1L alignR">
<asp:Label ID="Label2" runat="server" Text="Serial #: " Font-Bold="true" /></th>
<th colspan="2" class="border1R alignC">
<asp:Label ID="lblSN" runat="server" /></th>
<th> </th>
<th colspan="2" class="border1L alignR">
<asp:Label ID="Label3" runat="server" Text="Program: " Font-Bold="true" /></th>
<th colspan="2" class="border1R alignC">
<asp:Label ID="lblProgram" runat="server" /></th>
</tr>
<tr>
<th> </th>
</tr>
</thead>
<tbody>
<tr class="alignC">
<td></td>
<td colspan="4" class="border1">(FQA)</td>
<td></td>
<td colspan="4" class="border1">(MTF)</td>
<td></td>
<td colspan="4" class="border1">(FA)</td>
</tr>
<tr>
<td> </td>
<td class="border2 alignC">Record<br />
Error</td>
<td class="border2 alignC">Circle X</td>
<td class="border2 alignC">Red X</td>
<td class="border2 alignC">Diagonal</td>
<td> </td>
<td class="border2 alignC">Record<br />
Error</td>
<td class="border2 alignC">Circle X</td>
<td class="border2 alignC">Red X</td>
<td class="border2 alignC">Diagonal</td>
<td> </td>
<td class="border2 alignC">Record<br />
Error</td>
<td class="border2 alignC">Circle X</td>
<td class="border2 alignC">Red X</td>
<td class="border2 alignC">Diagonal</td>
<td rowspan="3" class="border2 alignC"><b>Quality<br />
Score</b></td>
</tr>
<tr>
<td valign="bottom" class="border1 alignR">Deduction</td>
<td valign="bottom" class="border3 alignC">-1%</td>
<td valign="bottom" class="border3 alignC">-2%</td>
<td valign="bottom" class="border3 alignC">-4%</td>
<td valign="bottom" class="border3 alignC">0%</td>
<td> </td>
<td valign="bottom" class="border3 alignC">-1%</td>
<td valign="bottom" class="border3 alignC">-2%</td>
<td valign="bottom" class="border3 alignC">-4%</td>
<td valign="bottom" class="border3 alignC">0%</td>
<td> </td>
<td valign="bottom" class="border3 alignC">-1%</td>
<td valign="bottom" class="border3 alignC">-2%</td>
<td valign="bottom" class="border3 alignC">-4%</td>
<td valign="bottom" class="border3 alignC">0%</td>
</tr>
<tr class="alignC">
<td class="border1 alignR"># of Incidents</td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFQA1" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFQA2" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFQA3" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFQA4" runat="server" /></td>
<td> </td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblMTF1" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblMTF2" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblMTF3" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblMTF4" runat="server" /></td>
<td> </td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFA1" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFA2" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFA3" runat="server" /></td>
<td class="border1" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFA4" runat="server" /></td>
</tr>
<tr class="alignC">
<td class="border1 alignR">Total</td>
<td class="border1">
<asp:Label ID="lblTFQA1" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFQA2" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFQA3" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFQA4" runat="server" Text="0%" /></td>
<td> </td>
<td class="border1">
<asp:Label ID="lblTMTF1" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTMTF2" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTMTF3" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTMTF4" runat="server" Text="0%" /></td>
<td> </td>
<td class="border1">
<asp:Label ID="lblTFA1" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFA2" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFA3" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTFA4" runat="server" Text="0%" /></td>
<td class="border1">
<asp:Label ID="lblTotal" runat="server" Font-Bold="true" /></td>
</tr>
<tr>
<td> </td>
</tr>
<asp:Repeater ID="Repeater" runat="server">
<ItemTemplate>
<tr>
<td class="borderBottom alignR"><b>Auditor:</b></td>
<td colspan="5" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblAuditor" runat="server" Text='<%# Eval("Auditor") %>' /></td>
<td class="borderBottom alignR"><b>CTR:</b></td>
<td colspan="5" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblCTR" runat="server" Text='<%# Eval("Mitigator") %>' /></td>
<td class="borderBottom alignR"><b>Date:</b></td>
<td colspan="3" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblDate" runat="server" Text='<%# Eval("Date", "{0:dd-MMM-yy}") %>' /></td>
</tr>
<tr>
<td class="borderBottom alignR" style="min-height: 30px"><b>Finding:</b></td>
<td colspan="15" class="borderBottom alignL" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblFinding" runat="server" Text='<%# Eval("Finding") %>' /></td>
</tr>
<tr>
<td class="borderBottom alignR"><b>Status:</b></td>
<td colspan="5" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblStatus" runat="server" Text='<%# Eval("FS") %>' /></td>
<td class="borderBottom alignR" colspan="2"><b>Location:</b></td>
<td colspan="8" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblLocation" runat="server" Text='<%# Eval("Location") %>' /></td>
</tr>
<tr>
<td class="borderBottom alignR"><b>Standard:</b></td>
<td colspan="15" class="borderBottom alignC" style="background-image: url(../_images/LgtGrey.png)">
<asp:Label ID="lblStandard" runat="server" Text='<%# Eval("Standard") %>' /></td>
</tr>
<tr>
<td> </td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
</div>
</asp:Content>
enter code![as you can see here the tabs are half eaten!][1] here
Hello, I have a problem with showing the tab stripe I don't know what is wrong with it. can any one help? when I run this the tabs are not fully shown I have three tabs and I tried this with different browsers but the issue persists.
below is a sample of the code:
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#62A5C8" BorderStyle="none" ForeColor="#ffffff" Height="450px" server="" Style=" background-color:#012F54; margin-top: 0px;" Width="100%" ScrollBars="Both" Font-Size="Medium"
ToolTip="Move between tabs to fill-in all information">
<asp:TabPanel runat="server" HeaderText="Student Information" ID="TabPanel1">
<ContentTemplate>
<asp:UpdatePanel ID="updatePanel1" runat="server">
<ContentTemplate>
<table class="auto-style15">
<tr>
<td class="auto-style27">
<br />
<span class="auto-style117">First Name:<br /> </span>
</td>
<td class="auto-style21">
<br />
<strong>
<asp:TextBox ID="TextBox1" runat="server" BorderColor="Black" BorderStyle="Solid" Height="23px" Width="198px" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style117">Last Name:</td>
<td class="auto-style24"><strong>
<asp:TextBox ID="TextBox2" runat="server" BorderStyle="Solid" Height="21px" Width="198px" BorderColor="Black" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td class="auto-style25"></td>
</tr>
<tr>
<td class="auto-style17"></td>
<td class="auto-style20"></td>
<td class="auto-style18"></td>
</tr>
<tr>
<td class="auto-style27" style="font-size: small; color: #043d5d">Student ID:</td>
<td class="auto-style21"><strong>
<asp:TextBox ID="TextBox3" runat="server" BorderStyle="Solid" Height="23px" Width="198px" BorderColor="Black" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style27" style="font-size: small; color: #043d5d">Department:</td>
<td class="auto-style21"><strong>
<asp:DropDownList ID="DropDownList1" runat="server" Height="27px" Width="295px" style="margin-left:7px;">
<asp:ListItem>Cardiac Technology</asp:ListItem>
<asp:ListItem>Clinical Laboratory Sciences</asp:ListItem>
</asp:DropDownList>
</strong>
</td>
<td> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
</tr>
<tr>
<td class="auto-style28"> </td>
<td class="auto-style21"> </td>
<td>
<asp:Button ID="Button1" runat="server" BackColor="#4DA3B0" BorderColor="#4DA3B0" Font-Bold="False" Font-Size="12pt" ForeColor="White" Height="36px" style="margin-left:10px;" Text="Next ►" Width="166px" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Graduate Form">
<ContentTemplate>
**
Hi brother use below code
first add refrence at the top of the page
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
then use below code
<asp:ScriptManager runat="server" ID="sc">
</asp:ScriptManager>
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#62A5C8"
BorderStyle="none" ForeColor="#ffffff" Height="450px" server="" Style="background-color: #012F54;
margin-top: 0px;" Width="100%" ScrollBars="Both" Font-Size="Medium" ToolTip="Move between tabs to fill-in all information">
<asp:TabPanel runat="server" HeaderText="Student Information" ID="TabPanel1">
<ContentTemplate>
<table class="auto-style15">
<tr>
<td class="auto-style27">
<br />
<span class="auto-style117">First Name:<br />
</span>
</td>
<td class="auto-style21">
<br />
<strong>
<asp:TextBox ID="TextBox1" runat="server" BorderColor="Black" BorderStyle="Solid"
Height="23px" Width="198px" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style117">
Last Name:
</td>
<td class="auto-style24">
<strong>
<asp:TextBox ID="TextBox2" runat="server" BorderStyle="Solid" Height="21px" Width="198px"
BorderColor="Black" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td class="auto-style25">
</td>
</tr>
<tr>
<td class="auto-style17">
</td>
<td class="auto-style20">
</td>
<td class="auto-style18">
</td>
</tr>
<tr>
<td class="auto-style27" style="font-size: small; color: #043d5d">
Student ID:
</td>
<td class="auto-style21">
<strong>
<asp:TextBox ID="TextBox3" runat="server" BorderStyle="Solid" Height="23px" Width="198px"
BorderColor="Black" CssClass="auto-style116"></asp:TextBox>
</strong>
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style27" style="font-size: small; color: #043d5d">
Department:
</td>
<td class="auto-style21">
<strong>
<asp:DropDownList ID="DropDownList1" runat="server" Height="27px" Width="295px" Style="margin-left: 7px;">
<asp:ListItem>Cardiac Technology</asp:ListItem>
<asp:ListItem>Clinical Laboratory Sciences</asp:ListItem>
</asp:DropDownList>
</strong>
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
</tr>
<tr>
<td class="auto-style28">
</td>
<td class="auto-style21">
</td>
<td>
<asp:Button ID="Button1" runat="server" BackColor="#4DA3B0" BorderColor="#4DA3B0"
Font-Bold="False" Font-Size="12pt" ForeColor="White" Height="36px" Style="margin-left: 10px;"
Text="Next ►" Width="166px" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="TabPanel2" runat="server" HeaderText="Graduate Form">
<ContentTemplate>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
I am Having a code for Modal PopUp windoe in which I wanna perform login operation and code for extender is as follows.
<div class="wrapper">
<ul id="icons">
<li><asp:ImageButton runat="server" ImageUrl="images/lgn.png" ID="btnimg" CssClass="image" /></li>
</ul>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnimg" PopupControlID="Panel1" BackgroundCssClass="modalBackground">
</asp:ModalPopupExtender >
<asp:panel id="Panel1" CssClass="popup" runat="server">
<div class="popup">
<div id="PopupHeader" style="height:55px;background-color:#f6f6f6;border-radius:10px;width:348px;font-size:2.7em; "> <font style="margin:30px 0px 0px 20px;vertical-align:middle;color:Black;line-height:1.2em; font-size:37px; font-family: BonvenoCF;"> Login </font></div>
<div class="PopupBody">
<table width="350px" style="vertical-align:middle;text-align:center;">
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px">
<asp:Label ID="Label1" runat="server" Text="User Name: "></asp:Label>
</td>
<td style="width:131.25px">
<asp:TextBox ID="txtUserName" runat="server" Height="20px" style="border-radius:8px;"> </asp:TextBox>
<asp:TextBoxWatermarkExtender ID="txtUserName_TextBoxWatermarkExtender" runat="server" Enabled="True" TargetControlID="txtUserName"WatermarkText="User Name">
</asp:TextBoxWatermarkExtender>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px"> </td>
<td style="width:131.25px"> </td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td style="width:131.25px">
<asp:Label ID="Label2" runat="server" Text="Password: " ></asp:Label>
</td>
<td style="width:131.25px">
<asp:TextBox ID="txtPassword" runat="server" Height="20px" style="border-radius:8px;"> </asp:TextBox>
<asp:TextBoxWatermarkExtender ID="txtPassword_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtPassword"
WatermarkText="Password">
</asp:TextBoxWatermarkExtender>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width:43.5px"> </td>
<td colspan="2">
<asp:Label ID="Label3" runat="server" Text="Invalid User Name Or Password." Visible="False"></asp:Label>
</td>
<td style="width:43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:Button ID="Button2" runat="server" CssClass="button" Text="Login" />
</td>
<td style="width: 131.25px">
<asp:Button ID="Button1" runat="server" CssClass="button" Text="Cancle" /></td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:LinkButton ID="LinkButton1" runat="server">Forgot Password</asp:LinkButton>
</td>
<td style="width: 131.25px">
<asp:Button ID="Button3" runat="server" CssClass="button" Text="Sign Up" />
</td>
<td style="width: 43.5px"> </td>
</tr>
</table>
</div>
</div>
</asp:panel>
</div>
on button2_Click code behind is as follows.
protected void Button2_Click(object sender, EventArgs e)
{
ds = obj.sel("select UserName and Password from tblUserMaster where UserName='"+txtUserName.Text+"' AND Password='"+txtPassword.Text+"'");
if (ds.Tables[0].Rows.Count == 0)
{
Label3.Visible = true;
}
else
{
Response.Redirect("Default.aspx");
}
}
But when i'm clicking on LOGIN Button it is not redirection me on Default.aspx page popup is getting closed.
while on clicking on cancel button it is not working at all.
please suggest an solution as soon as possible.
use update panel for refreshing problem .
here is complete code .
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div class="wrapper">
<ul id="icons">
<li><asp:ImageButton runat="server" ImageUrl="images/lgn.png" ID="btnimg" CssClass="image" /></li>
</ul>
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnimg" PopupControlID="Panel1" BackgroundCssClass="modalBackground" CancelControlID="Button1"></asp:ModalPopupExtender>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel1" CssClass="popup" runat="server">
<div class="popup">
<div id="PopupHeader" style="height: 55px; background-color: #f6f6f6; border-radius: 10px; width: 348px; font-size: 2.7em;"><font style="margin: 30px 0px 0px 20px; vertical-align: middle; color: Black; line-height: 1.2em; font-size: 37px; font-family: BonvenoCF;"> Login </font></div>
<div class="PopupBody">
<table width="350px" style="vertical-align: middle; text-align: center;">
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px"> </td>
<td style="width: 131.25px"> </td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:Label ID="Label1" runat="server" Text="User Name: "></asp:Label>
</td>
<td style="width: 131.25px">
<asp:TextBox ID="txtUserName" runat="server" Height="20px" Style="border-radius: 8px;"> </asp:TextBox>
</td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px"> </td>
<td style="width: 131.25px"> </td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:Label ID="Label2" runat="server" Text="Password: "></asp:Label>
</td>
<td style="width: 131.25px">
<asp:TextBox ID="txtPassword" runat="server" Height="20px" Style="border-radius: 8px;"> </asp:TextBox>
<asp:TextBoxWatermarkExtender ID="txtPassword_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtPassword"
WatermarkText="Password">
</asp:TextBoxWatermarkExtender>
</td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td colspan="2">
<asp:Label ID="Label3" runat="server" Text="Invalid User Name Or Password." Visible="False"></asp:Label>
</td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:Button ID="Button2" runat="server" CssClass="button" Text="Login" OnClick="Button2_Click" />
</td>
<td style="width: 131.25px">
<asp:Button ID="Button1" runat="server" CssClass="button" Text="Cancle" /></td>
<td style="width: 43.5px"> </td>
</tr>
<tr>
<td style="width: 43.5px"> </td>
<td style="width: 131.25px">
<asp:LinkButton ID="LinkButton1" runat="server">Forgot Password</asp:LinkButton>
</td>
<td style="width: 131.25px">
<asp:Button ID="Button3" runat="server" CssClass="button" Text="Sign Up" OnClick="Button3_Click" />
</td>
<td style="width: 43.5px"> </td>
</tr>
</table>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
#Chirag : you haven't added the onclick event on your button . so please add this ..
edit your code .
<asp:Button ID="Button2" runat="server" CssClass="button" Text="Login" OnClick="Button2_Click"/>
"
SelectCommand="select case when len(T.hallticketno)=1 then '0000'+ convert(varchar(20),T.hallticketno)
when len(T.hallticketno)=2 then '000'+ Convert(varchar(20),T.hallticketno)
when len(T.hallticketno)=3 then '00'+ Convert(varchar(20),T.hallticketno)
when len(T.hallticketno)=4 then '0'+ Convert(varchar(20),T.hallticketno)
when len(T.hallticketno)=5 then Convert(varchar(20),T.hallticketno) end as Hallticketno
,T.Studentname,(select senseiname from senseimaster where senseiid=T.senseiID) as SenseiName,(select kyuname from kyumaster where kyuid= T.kyuid) as Kyu,(select groupname from groupmaster where groupid= T.groupid) as GroupName,T.Fathername,convert(varchar(20),T.dob,103) as Dob, case when T.sex=0 then 'Male' else 'Female' end as Gender
from applicationForm T where Franchiseid =#FRANCHISEID and Competitionid=#competitionId
order by groupname ">
--%>
CompanyName
City
--%>
<table id ="sample " border ="1px" visible ="false" >
<tr>
<asp:Label ID="Label13" runat ="server" Font-Bold="true" Text ='<%#Bind(CompetitionName)%>' ></asp:Label><td style="width: 100px">
</td>
<td style="width: 106px">
</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
</td>
</tr>
<tr>
<td style="width: 100px">
Venue</td>
<td style="width: 106px">
<asp:Label ID="Label14" runat ="server" Font-Bold="true" Text ='<%Bind(competitionaddress) %>' ></asp:Label>
</td>
<td style="width: 127px">
Date of Competition</td>
<td style="width: 129px">
<asp:Label ID ="Label15" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td style="width: 100px">
Hall Ticket No</td>
<td style="width: 106px">
<asp:Label Font-Bold="true" Font-Size="X-Large" ID="Label16" runat="server" ></asp:Label>
</td>
<td style="width: 127px">
Group</td>
<td style="width: 129px">
<asp:Label ID="Label17" runat="server" Font-Bold="true"></asp:Label>
<%--<asp:Label ID="Lable1" runat ="server" Font-Bold="true" Text ='<%Bind("GroupName")%>'></asp:Label>--%>
</td>
</tr>
<tr>
<td style="width: 100px">
Student Name</td>
<td style="width: 106px">
<asp:Label ID ="Lable18" runat ="server" ></asp:Label>
</td>
<td style="width: 127px">
Kyu</td>
<td style="width: 129px">
<asp:Label ID="Lable19" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td rowspan="3" style="width: 100px">
</td>
<td style="width: 106px">
<asp:Label ID ="Lable20" runat ="server" ></asp:Label>
</td>
<td style="width: 127px">
Franchise Name</td>
<td style="width: 129px">
<asp:Label ID ="Lable21" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td style="width: 106px">
</td>
<td style="width: 127px">
Sensei's Name</td>
<td style="width: 129px">
<asp:Label ID ="Lable22" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td style="width: 106px">
</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 106px">
Signature of HO</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
Signature of Student</td>
</tr>
</table>
<%--</asp:Repeater> --%>
if i click the Hall Ticket then the data sholud be bound to particular field...how to do friends plz help me...
You must use a control supporting DataBind, enclosing your table, like a FormView.