Blank space arrangement in asp.net design page - asp.net

I have a created a profile page for my website, there is a photo, upload button and a fileUpload control. Controls such as First name/ last name etc are placed In a panel separate from image and image control. The problem is that Panel leaves a huge margin from top (I haven't given margin-top). I want to remove that white space. I have tried a couple of things such as providing position (absolute/relative) and I tried to rearrange the controls but didn't work
.common
{
float: left;
position: relative;
}
.Panel
{
margin-right: 50px;
padding: 20px;
float: right;
}
.layWork
{
border: white 2px solid;
width: 800px;
background-color: white;
border-radius: 50px;
height: 700px;
margin: 50px 0px 20px 50px;
}
<div class="layWork">
<div class="Frontier">
<br />
<br />
<asp:Image ID="Shasshin" runat="server" src="../Property/EmptyIcon.png" Height="200px" Width="200px" cssClass="common"/>
<br />
<asp:Panel ID="proPan" runat="server" CssClass="Panel">
<asp:Label ID="proFNameLabel" Text="First Name : " runat="server" />
<asp:TextBox ID="proFNameBox" runat="server" Text=""/>
<br /><br />
<asp:Label ID="proLNameLabel" Text="Last Name : " runat="server" />
<asp:TextBox ID="proLNameBox" runat="server" Text="" />
<br /><br />
<asp:Label ID="proAge" Text="Age : " runat="server" />
<asp:TextBox ID="proAgeBox" runat="server" />
<br /><br />
<asp:Label ID="proBirth" Text="Birthdate : " runat="server"/>
<asp:TextBox ID="proBirthBox" runat="server"/>
<br /><br />
<asp:Label ID="proLoc" Text="Localtion : " runat="server" />
<asp:TextBox ID="proLocBox" runat="server" />
<br /><br />
<asp:Label ID="proNumber" Text="Phone : " runat="server" />
<asp:TextBox ID="proNumBox" runat="server" />
<br /><br />
<asp:Label ID="SkypeID" Text="Skype ID : " runat="server" />
<asp:LinkButton ID="proSkype" runat="server">Link</asp:LinkButton>
<br /><br />
<asp:Label ID="proDesc" Text="Description : " runat="server" />
<asp:TextBox ID="proDescBox" TextMode="MultiLine" runat="server" />
<br /><br />
<asp:Label ID="proDev" Text="Developer : " runat="server" />
<asp:TextBox ID="proDevBox" runat="server" />
</asp:Panel>
<asp:FileUpload ID="PhotoPicker" CssClass="common" runat="server" /><br />
<asp:Button ID="PhotoSender" runat="server" cssClass="common" Text="Upload" />
</div>
</div>

I use table generally ,so this may help.
<table>
<tr>
<td style="vertical-align:top"> <asp:Image ID="Shasshin" runat="server" src="../Property/EmptyIcon.png" Height="200px" Width="200px" cssClass="common"/></td>
<td> </td>
<td style="vertical-align:top"> <asp:Panel ID="proPan" runat="server" CssClass="Panel">
<asp:Label ID="proFNameLabel" Text="First Name : " runat="server" />
<asp:TextBox ID="proFNameBox" runat="server" Text=""/>
<br /><br />
<asp:Label ID="proLNameLabel" Text="Last Name : " runat="server" />
<asp:TextBox ID="proLNameBox" runat="server" Text="" />
<br /><br />
<asp:Label ID="proAge" Text="Age : " runat="server" />
<asp:TextBox ID="proAgeBox" runat="server" />
<br /><br />
<asp:Label ID="proBirth" Text="Birthdate : " runat="server"/>
<asp:TextBox ID="proBirthBox" runat="server"/>
<br /><br />
<asp:Label ID="proLoc" Text="Localtion : " runat="server" />
<asp:TextBox ID="proLocBox" runat="server" />
<br /><br />
<asp:Label ID="proNumber" Text="Phone : " runat="server" />
<asp:TextBox ID="proNumBox" runat="server" />
<br /><br />
<asp:Label ID="SkypeID" Text="Skype ID : " runat="server" />
<asp:LinkButton ID="proSkype" runat="server">Link</asp:LinkButton>
<br /><br />
<asp:Label ID="proDesc" Text="Description : " runat="server" />
<asp:TextBox ID="proDescBox" TextMode="MultiLine" runat="server" />
<br /><br />
<asp:Label ID="proDev" Text="Developer : " runat="server" />
<asp:TextBox ID="proDevBox" runat="server" />
</asp:Panel></td>
</tr>
<tr>
<td> <asp:FileUpload ID="PhotoPicker" CssClass="common" runat="server" /></td>
<td> <asp:Button ID="PhotoSender" runat="server" cssClass="common" Text="Upload" /> </td>
</tr>
</table>

Related

Passing Eval Through Command Argument in Listview

I have a link button that I am trying to pass a parameter through into the OnClick event handler. To do this I am using the CommandArgument field.
I have this link button within a listview so I am retireving the data using Eval, so I want to pass that value into the CommandArgument as such:
<asp:LinkButton id="BTN_ApproveTicket" runat="server" CommandArgument="<%#Eval("TicketNum").ToString()%>" OnClick="BTN_ApproveTicket_Click">
</asp:LinkButton>
I am doing this exact think with some table elements in my page, but this one is not working.
The error that I am getting is it is taking the <%#Eval("TicketNum").ToString() as a literal, so I am getting a server tag is not well formatted error. Any ideas on how to fix this would be greatly appreciated.
This is the AlternatingItemTemplate that is in question:
<AlternatingItemTemplate>
<td style="<%#setTicketClass(Eval("TicketNum").ToString(), Eval("UnitID").ToString(), Eval("TicketDate").ToString())%>" >
<asp:LinkButton id="BTN_ApproveTicket" runat="server" CommandArgument='<%#Eval("TicketNum").ToString()%>' OnClick="BTN_ApproveTicket_Click">
<i class="fa fa-check-square-o" style="<%#setCheckBoxClass(Eval("Approved").ToString())%>" ></i>
</asp:LinkButton>
<br />
<br />
JobID:
<asp:Label ID="JobIDLabel" runat="server" Text='<%# Eval("JobID") %>' />
<br />
Ticket #:
<asp:Label ID="TicketNumLabel" runat="server" Text='<%# Eval("TicketNum") %>' />
<br />
Unit:
<asp:Label ID="UnitIDLabel" runat="server" Text='<%# Eval("UnitID") %>' />
<br />
Total Ticket Hours:
<asp:Label ID="TicketHoursLabel" runat="server" Text='<%# Eval("TicketHours") %>' />
<br />
Total Product:
<asp:Label ID="TicketProductLabel" runat="server" Text='<%# Eval("TicketProduct") %>' />
<br />
Ticket Date:
<asp:Label ID="TicketDateLabel" runat="server" Text='<%# Eval("TicketDate", "{0:MMM dd yyyy}") %>' />
<br />
Charge To Customer:
<asp:Label ID="ChargeToCustomerLabel" runat="server" Text='<%# Eval("ChargeToCustomer") %>' />
<br />
Received From Customer:
<asp:Label ID="RecievedToCuLabel" runat="server" Text='<%# Eval("RecievedToCu") %>' />
<br />
Deliver To Customer:
<asp:Label ID="DeliverTocu" runat="server" Text='<%# Eval("DeliverToCu") %>' />
<br />
Charged To LSD:
<asp:Label ID="LBL_ChargedToLSD" runat="server" Text='<%# Eval("ChargedToLSD") %>' />
<br />
Received From LSD:
<asp:Label ID="RecievedFromLSDLabel" runat="server" Text='<%# Eval("RecievedFromLSD") %>' />
<br />
Delivered To LSD:
<asp:Label ID="DeliveredToLSDLabel" runat="server" Text='<%# Eval("DeliveredToLSD") %>' />
<br />
Subtotal:
<asp:Label ID="SubtotalLabel" runat="server" Text='<%# Eval("Subtotal", "{0:C}") %>' Font-Bold="True" />
<br />
GST:
<asp:Label ID="GSTLabel" runat="server" Text='<%# Eval("GST", "{0:P}") %>' Font-Bold="True" />
<br />
Total:
<asp:Label ID="TotalLabel" runat="server" Text='<%# Eval("Total", "{0:C}") %>' Font-Bold="True" />
<br />
Job Notes:
<asp:Label ID="PreJobNotesLabel" runat="server" Text='<%# Eval("PreJobNotes") %>' />
<br />
Job Description:
<asp:Label ID="JobDescLabel" runat="server" Text='<%# Eval("JobDesc") %>' />
<br />
Time Created:
<asp:Label ID="TimeCreatedLabel" runat="server" Text='<%# Eval("TimeCreated", "{0: MMM-dd-yyyy HH:mm}") %>' />
<br />
Created By:
<asp:Label ID="CreatedByLabel" runat="server" Text='<%# Eval("CreatedBy") %>' />
<br />
<asp:LinkButton class="btn-inverse" id="EditButton" runat="server" CommandName="Edit" Text="Edit" Enabled='<%# checkButtonEnabled() %>' style="padding: 2px 8px; text-decoration: none; border: solid 1px;" >
<span class="glyphicon glyphicon-edit"></span> Edit
</asp:LinkButton>
<asp:LinkButton class="btn-inverse" id="DeleteButton" runat="server" CommandName="Delete" Text="Delete" onclientclick="return DeleteItem()" Enabled='<%# checkButtonEnabled() %>' style="padding: 2px 8px; text-decoration: none; border: solid 1px;" >
<span class="glyphicon glyphicon-trash"></span> Delete
</asp:LinkButton>
<asp:LinkButton class="btn-inverse" id="SelectButton" runat="server" CommandName="Select" Text="Show Product" style="padding: 2px 8px; text-decoration: none; border: solid 1px; white-space: nowrap;" >
<span class="glyphicon glyphicon-menu-down"></span> Show Product
</asp:LinkButton>
</td>
</AlternatingItemTemplate>
It might have to do with quotes - you are using double quotes everywhere, which may confuse parser. Try replacing outer ones with single quote:
CommandArgument='<%#Eval("TicketNum").ToString()%>'

asp:FileUpload won't center within a fieldset

I'm trying to center a bunch of control within a fieldset and 2 of them are <asp:FileUpload /> .One is behaving as intended but not the other :
I've created my fieldset within a <div id="container"> and inside the fieldset you have a <div class="content"> which contains the Labels, FileUpload etc.
The aspx file is as follow :
<div id="container">
<fieldset>
<legend style="color:#CC0000; font-size:medium; font-weight:bold">Nouvelle demande de tarif imagé</legend>
<br />
<div class="content">
<asp:Label ID="Label2" runat="server" Text="Nom du catalogue : "
Font-Bold="True"></asp:Label>
<asp:TextBox ID="TB_name" runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator2" runat="server"
ErrorMessage="CustomValidator" ControlToValidate="TB_name" ForeColor="#CC0000"
onservervalidate="CustomValidator2_ServerValidate" ValidateEmptyText="True"></asp:CustomValidator>
<br />
<br />
<asp:Label ID="Label3" runat="server"
Text="Veuillez sélectionner un fichier CSV :" Font-Bold="True"></asp:Label><br />
<br />
<asp:FileUpload ID="csvUpload" runat="server" />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ErrorMessage="CustomValidator" ControlToValidate="csvUpload"
Display="Dynamic" ForeColor="#CC0000"
onservervalidate="CustomValidator1_ServerValidate"
ValidateEmptyText="True"></asp:CustomValidator>
<br />
<br />
<br />
<asp:Label ID="Label1" runat="server"
Text="Veuillez sélectionner un logo (facultatif) :" Font-Bold="True"></asp:Label><br />
<br />
<asp:FileUpload ID="pictureUpload" runat="server" />
<asp:CustomValidator ID="CustomValidator3" runat="server"
ErrorMessage="CustomValidator" ControlToValidate="pictureUpload"
ForeColor="#CC0000" onservervalidate="CustomValidator3_ServerValidate"
ValidateEmptyText="True"></asp:CustomValidator>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Valider"
onclick="Button1_Click" />
<br />
<br />
<asp:HyperLink ID="HyperLink_validee" runat="server" Font-Underline="True"
ForeColor="#009933" NavigateUrl="~/TarifImageHistorique.aspx">Votre demande a bien été enregistrée</asp:HyperLink>
<br />
</div>
</fieldset>
</div>
and here is the CSS :
fieldset
{
margin-bottom:20px;
border:1px solid rgb(149,149,149);
padding: 10px 10px 10px 10px;
width:100%;
}
#container
{
margin-left:auto;
margin-right:auto;
width:400px;
}
.content
{
text-align:center;
}
I don't get why the second FileUpload won't align as the first one. Can anyone enlighten me ?
Your CustomValidator3 in front of second file upload control needs dynamic displaying so just add Display="Dynamic" and done.
You have to put your second file upload control in <center> tag.
Below code around line 31
... // your code
<center>
<asp:FileUpload ID="pictureUpload" runat="server" />
</center>
... // your code

UpdatePanel buttons fires onclick_event once only

Here Is The Code, I'll Explain it better at the end of the post
<div class="container">
<br />
<div id="infoCli" class="well" style="height: auto; width: auto;">
<table>
<tr>
<td>
<asp:Label runat="server" AssociatedControlID="cdCli" Enabled="False">Código</asp:Label>
<br />
<asp:TextBox runat="server" ID="cdCli" Width="40px" ReadOnly="True" />
</td>
<td class="auto-style39">
<asp:Label runat="server" AssociatedControlID="nmFantasia">Nome Fantasia</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmFantasia" ControlToValidate="nmFantasia" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmFantasia" Width="368px" MaxLength="30" TabIndex="1" />
</td>
<td>
<asp:Label runat="server" AssociatedControlID="nmCli">Razão Social</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCli" ControlToValidate="nmCli" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmCli" Width="589px" TabIndex="2" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style42">
<asp:Label runat="server" AssociatedControlID="tpCli">Tipo de Cliente</asp:Label>
<br />
<asp:DropDownList ID="tpCli" runat="server" Height="25px" Width="145px" TabIndex="3" Enabled="False">
<asp:ListItem Value="0">Somente Consulta</asp:ListItem>
<asp:ListItem Value="1">Eventual</asp:ListItem>
<asp:ListItem Value="2">C/ Contrato</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style54">
<asp:Label runat="server" AssociatedControlID="nrCGC">CNPJ</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCGC" Width="138px" TabIndex="4" />
</td>
<td class="auto-style69">
<asp:Label runat="server" AssociatedControlID="nrCPF">CPF</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCPF" Width="110px" TabIndex="5" />
</td>
<td class="auto-style43">
<asp:Label runat="server" AssociatedControlID="nrCGF">CGF</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCGF" ControlToValidate="nrCGF" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrCGF" Width="134px" TabIndex="6" />
</td>
<td class="auto-style32">
<asp:Label runat="server" AssociatedControlID="CheckBox1" TabIndex="7">Isento
<br />
<asp:CheckBox ID="CheckBox1" runat="server" />
</asp:Label>
</td>
<td class="auto-style56">
<asp:Label runat="server" AssociatedControlID="inscMun">Insc. Mun</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvInscMun" ControlToValidate="inscMun" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="inscMun" Width="106px" TabIndex="8" />
</td>
<td class="auto-style55">
<asp:Label runat="server" AssociatedControlID="nrCEI">CEI</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCEI" ControlToValidate="nrCEI" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrCEI" Width="133px" TabIndex="9" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style66">
<asp:Label runat="server" AssociatedControlID="nrCep">CEP</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCep" ControlToValidate="nrCep" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ToolTip="A Consulta ao CEP só será realizada caso esteja conectado à internet" ID="nrCep" onblur="Javascript:atualizacep(this.value)" Width="98px" TabIndex="10" data-mask="99999-999" />
</td>
<td>
<asp:Label runat="server" AssociatedControlID="dsEnder">Endereço</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsEnder" ControlToValidate="dsEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEnder" Width="377px" TabIndex="11" />
</td>
<td class="auto-style46">
<asp:Label runat="server" AssociatedControlID="nrEnder">Número</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNrEnder" ControlToValidate="nrEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrEnder" Width="46px" TabIndex="12" />
</td>
<td class="auto-style68">
<asp:Label runat="server" AssociatedControlID="dsBairro">Bairro</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsBairro" ControlToValidate="dsBairro" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsBairro" Width="196px" TabIndex="13" />
</td>
<td class="auto-style25">
<asp:Label runat="server" AssociatedControlID="compEnder">Complemento</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCompEnder" ControlToValidate="compEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="compEnder" Width="141px" TabIndex="14" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style43">
<asp:Label runat="server" AssociatedControlID="dsCid">Cidade</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsCid" ControlToValidate="dsCid" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsCid" Width="414px" TabIndex="15" />
</td>
<td class="auto-style51"> <asp:Label runat="server" AssociatedControlID="cdUF">UF</asp:Label>
<asp:RequiredFieldValidator ID="rfvCdUF" runat="server" ControlToValidate="cdUF" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="cdUF" Width="34px" TabIndex="166" />
</td>
<td class="auto-style48">
<asp:Label runat="server" AssociatedControlID="foCli">Telefone</asp:Label>
<asp:RequiredFieldValidator ID="rfvFoCli" runat="server" ControlToValidate="foCli" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foCli" Width="122px" TabIndex="17" />
</td>
<td class="auto-style19">
<asp:Label runat="server" AssociatedControlID="nrFax">Fax</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNrFax" ControlToValidate="nrFax" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrFax" Width="126px" TabIndex="18" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style57">
<asp:Label runat="server" AssociatedControlID="cdIBGE" Width="133px">Cód. Cidade IBGE</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCdIBGE" ControlToValidate="cdIBGE" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="cdIBGE" Width="113px" TabIndex="19" />
</td>
<td class="auto-style52">
<asp:Label runat="server" AssociatedControlID="cdNatOpe" Width="170px">Natureza da Operação</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCdNatOpe" ControlToValidate="cdNatOpe" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:DropDownList ID="cdNatOpe" runat="server" Height="25px" Width="404px" TabIndex="20">
<asp:ListItem Value="0">(escolha uma opção):</asp:ListItem>
<asp:ListItem Value="1">Tributação No Município</asp:ListItem>
<asp:ListItem Value="2">Tributação Fora do Município</asp:ListItem>
<asp:ListItem Value="3">Isenção</asp:ListItem>
<asp:ListItem Value="4">Imune</asp:ListItem>
<asp:ListItem Value="5">Exigibilidade Suspensa por Decisão Judicial</asp:ListItem>
<asp:ListItem Value="6">Exigibilidade Suspensa por Procedimento Administrativo</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
<div class="container">
<div class="container">
<div class="row">
<div class="checkbox">
<label for="CheckBox2">
<asp:CheckBox ID="CheckBox2" runat="server" TabIndex="22" />
Simples Nacional
</label>
<label for="CheckBox3">
<asp:CheckBox ID="CheckBox3" runat="server" />
Inadiplente
</label>
<label for="CheckBox4">
<asp:CheckBox ID="CheckBox4" runat="server" TabIndex="23" />
Incentivador Cultural
</label>
<label for="CheckBox5">
<asp:CheckBox ID="CheckBox5" runat="server" TabIndex="24" />
Inativo
</label>
</div>
<br />
</div>
</div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6 pull-right">
<asp:Button CssClass="btn btn-default" ID="btnCons" runat="server" Text="Consultar" OnClick="Consultar" CausesValidation="false" />
<asp:Button CssClass="btn btn-default" ID="btnInse" runat="server" Text="Inserir" OnClick="Inserir" CausesValidation="false" />
<asp:LinkButton runat="server" OnClick="Consultar" CausesValidation="false" >Consultar</asp:LinkButton>
</div>
</div>
</div>
<%--DIV - WELL--%>
<br />
<div id="endCob" class="well" style="height: auto; width: auto;">
<div class="checkbox-inline">
<label for="CheckBox7" class="checkbox-inline">
<asp:CheckBox ID="checkEndeCob" OnClick="Javascript:checkEndCob()" runat="server" TabIndex="25" />
Endereço do cliente é o mesmo que o Endereço de Cobrança
</label>
</div>
<table>
<tr>
<td class="auto-style28">
<asp:Label runat="server" AssociatedControlID="nrCepCob">CEP</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCepCob" onblur="Javascript:atualizacep(this.value)" Width="98px" TabIndex="26" />
</td>
<td class="auto-style29">
<asp:Label runat="server" AssociatedControlID="dsEnderCob">Endereço</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEnderCob" Width="373px" TabIndex="27" />
</td>
<td class="auto-style40">
<asp:Label runat="server" AssociatedControlID="nrEnderCob">Número</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrEnderCob" Width="38px" TabIndex="28" />
</td>
<td class="auto-style31">
<asp:Label runat="server" AssociatedControlID="dsBairroCob">Bairro</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsBairroCob" Width="179px" TabIndex="29" />
</td>
<td class="auto-style25">
<asp:Label runat="server" AssociatedControlID="compEnderCob">Complemento</asp:Label>
<br />
<asp:TextBox runat="server" ID="compEnderCob" Width="194px" TabIndex="30" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style23">
<asp:Label runat="server" AssociatedControlID="dsCidCob">Cidade</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsCidCob" Width="252px" TabIndex="31" />
</td>
<td class="auto-style27">
<asp:Label runat="server" AssociatedControlID="cdUFCob">UF</asp:Label>
<br />
<asp:TextBox runat="server" ID="cdUFCob" Width="33px" TabIndex="32" />
</td>
<td class="auto-style3">
<asp:Label runat="server" AssociatedControlID="foCliCob">Telefone</asp:Label>
<br />
<asp:TextBox runat="server" ID="foCliCob" Width="108px" TabIndex="33" />
</td>
<td class="auto-style19">
<asp:Label runat="server" AssociatedControlID="nrFaxCob">Fax</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nrFaxCob" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrFaxCob" Width="113px" TabIndex="34" />
</td>
</tr>
</table>
</div>
<br />
<div id="contatoCli" class="well" style="height: auto; width: auto;">
<table>
<tr>
<td class="auto-style70">
<asp:Label runat="server" AssociatedControlID="nmContat1">Comercial</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat1" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat1" Width="396px" TabIndex="35" />
</td>
<td class="auto-style72">
<asp:Label runat="server" AssociatedControlID="foneCont1">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont1" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont1" Width="122px" TabIndex="36" />
</td>
<td class="auto-style62">
<asp:Label runat="server" AssociatedControlID="dsEmail1" Width="46px">E-Mail</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEmail1" Width="343px" TabIndex="37" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat2">Financeiro</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat2" Width="396px" TabIndex="38" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont2">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont2" Width="122px" TabIndex="39" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail2">E-Mail</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="dsEmail2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEmail2" Width="343px" TabIndex="40" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat3">Operacional</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat3" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat3" Width="396px" TabIndex="41" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont3" Width="66px">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont3" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont3" Width="122px" TabIndex="42" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail3">E-Mail</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEmail3" Width="343px" TabIndex="43" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat4">Expedição</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat4" Width="396px" TabIndex="44" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont4">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont4" Width="122px" TabIndex="45" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail4">E-Mail</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="dsEmail4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEmail4" Width="343px" TabIndex="46" />
</td>
</tr>
</table>
</div>
<br />
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnCons" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
So, Here is the problem, I have a MasterPage which has the Header and the Footer of the page, and my children page is just the content, so, in this case, this form.
When I First click the button, it will work as planned, it will go on the database retrive my data and move to the textboxes ( texbox.Text = value; ).
But when I change the values, to do a second search the OnClick_Event its not fired, I have a breakpoint in the method so I can see it doesn't get there.
Also, with FireBug on I can see that when I click the button for the first time I get a "Refference Error: MyMethod is Not Defined" but it still brings my data and enters the method.
And when I click it for the second time I get the same Refference Error and I get a
"Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404"
as well
I'm really new at ASP.NET, I Have an understaining at JSF, But, this had to be done at ASP.NET Webforms
Thanks,
Gabriel
So, Sorry!! haha I feel so dumb for not noticing that earlier!!!
In the Reference Error (JS) it said /MyPage.aspx/MyMethod, but, for some reason i forgot that MyPage.aspx is inside a folder, I still don't quite understand why the second time it "forgot" the page directory, but, I took it of the folder and put it in the project main folder, and it fixed

CSS footer are going in place of right side

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.

how do i use a photo slide show inside listview?

how do i use a photo slide show inside listview??i am using jquery....the first row works fine..the pictures keep on looping...but in the next rows the pictures do not change..i mean its static...i am binding the image path from the columns"Image1" "Image2" "Image3".
<%# Page Language="VB" AutoEventWireup="false" CodeFile="Restaurant.aspx.vb" Inherits="Restaurant" %>
<!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>
<link href="CSS_Styles/twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="CSS_Styles/Restaurant.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
/***
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc. Please link out to me if you like it :)
***/
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ($active.length == 0) $active = $('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
// uncomment the 3 lines below to pull the images in random order
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$next.css({ opacity: 0.0 })
.addClass('active')
.animate({ opacity: 1.0 }, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval("slideSwitch()", 5000);
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="container">
<div class="header">
<asp:LoginStatus ID="LoginStatus1" runat="server"
ForeColor="White"
CssClass="signin" />
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
CssClass="register"
ForeColor="White"
NavigateUrl="~/login.aspx">Register</asp:HyperLink>
<asp:Label ID="Label2" runat="server"
ForeColor="White"
CssClass="welcome">Welcome!Guest.
</asp:Label>
</AnonymousTemplate>
<LoggedInTemplate>
<asp:HyperLink ID="HyperLink2" runat="server"
NavigateUrl="~/account.aspx"
ForeColor="White"
CssClass="myaccount"
ToolTip="Click here to go to your account page.">My Account</asp:HyperLink>
<asp:Label ID="Label2" runat="server"
ForeColor="White"
CssClass="welcome">Welcome!<asp:LoginName ID="LoginName2" runat="server" />
</asp:Label>
</LoggedInTemplate>
</asp:LoginView>
<!-- end .header --></div>
<div id="navPos">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li>
<asp:HyperLink ID="Home" runat="server" NavigateUrl="~/homepage_aspx/homepage.aspx">Home</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="Products" runat="server" CssClass="MenuBarItemSubmenu">Products</asp:HyperLink>
<ul>
<li><asp:HyperLink ID="Groceries" runat="server">Groceries</asp:HyperLink></li>
<li><asp:HyperLink ID="DepartmentalItems" runat="server">Departmental Items</asp:HyperLink></li>
<li><asp:HyperLink ID="Electronics" runat="server">Electronics</asp:HyperLink>
<ul>
<li><asp:HyperLink ID="Mobiles" runat="server" NavigateUrl="~/itemsDisplayPage_aspx/itemsDisplayPage.aspx?typeOfItem=mobiles">Mobiles</asp:HyperLink></li>
<li><asp:HyperLink ID="Laptops" runat="server" NavigateUrl="~/itemsDisplayPage_aspx/itemsDisplayPage.aspx?typeOfItem=computers">Laptops & Computers</asp:HyperLink></li>
<li><asp:HyperLink ID="Accessories" runat="server">Accessories</asp:HyperLink></li>
</ul>
</li>
<li><asp:HyperLink ID="Kitchen" runat="server">Kitchen Items</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink5" runat="server">HyperLink</asp:HyperLink></li>
<li><asp:HyperLink ID="HyperLink6" runat="server">HyperLink</asp:HyperLink></li>
</ul>
</li>
<li><asp:HyperLink ID="WhyUS" runat="server">Why Us</asp:HyperLink></li>
<li><asp:HyperLink ID="Payment" runat="server">Payment</asp:HyperLink></li>
<li><asp:HyperLink ID="Contact_Us" runat="server" NavigateUrl="ContactUs.aspx">Contact Us</asp:HyperLink></li>
<li><asp:HyperLink ID="AboutUs" runat="server">About Us</asp:HyperLink></li>
</ul>
</div><br /><br />
<div class="content1">
<div>
<asp:SiteMapPath ID="SiteMapPath1" runat="server">
</asp:SiteMapPath>
</div>
<br />
<!-- <div id="wrapper">
<div id="ResImage">
</div>
<div id="ResDesc">
<asp:Label ID="lblDesc" runat="server" Width="290px" Height="190px" BackColor="White">
Pay Rs 499 for MAKEOVER PACKAGE:
Revival Facial, Haircut, Hair Wash, Blow Dry,
Upper Lip & Eyebrows Threading worth
Rs 1480 # LAKME STUDIOS & SALONS, DELHI & NCR
(Valid at 16 outlets)</asp:Label>
</div>
<div id="ResPrice1">
<asp:Label ID="lblValue" runat="server" Text="Value" CssClass="ResValue"></asp:Label>
<asp:Label ID="lblDiscount" runat="server" Text="Discount" CssClass="ResDiscount"></asp:Label>
<asp:Label ID="lblYouPay" runat="server" Text="You Pay" CssClass="ResYouPay"></asp:Label>
<div id="ResPrice2">
<asp:Label ID="lblValueAmt" runat="server" Text="Rs.2000" CssClass="ResValueAmt"></asp:Label>
<asp:Label ID="lblDiscountAmt" runat="server" Text="Rs.6000" CssClass="ResDiscountAmt"></asp:Label>
<asp:Label ID="lblYouPayAmt" runat="server" Text="Rs.1400" CssClass="ResYouPayAmt"></asp:Label>
</div>
<asp:LinkButton ID="lnkGetCoupon" runat="server">Get Discount Coupon</asp:LinkButton>
</div>
<div id="HowItWorks">
<asp:Label ID="lblHowItWorks" runat="server" Text="How It Works?" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
<ul>
<li><asp:Label ID="Label3" runat="server" Text="1.Click on the 'Get Discount Coupon' button" Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label4" runat="server" Text="2.Get a print of your Voucher and carry it during your visit to the outlet." Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label5" runat="server" Text="3.Show your Voucher and pay the amount directly to the merchant. " Font-Size="10px"></asp:Label></li>
</ul>
</div>
</div> -->
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1"
DataKeyNames="OfferID" GroupItemCount="2" >
<EmptyDataTemplate>
<table runat="server" style="">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
OfferID:
<asp:TextBox ID="OfferIDTextBox" runat="server" Text='<%# Bind("OfferID") %>' />
<br />
RestaurantID:
<asp:TextBox ID="RestaurantIDTextBox" runat="server"
Text='<%# Bind("RestaurantID") %>' />
<br />
Offer:
<asp:TextBox ID="OfferTextBox" runat="server" Text='<%# Bind("Offer") %>' />
<br />
Value:
<asp:TextBox ID="ValueTextBox" runat="server" Text='<%# Bind("Value") %>' />
<br />
Discount:
<asp:TextBox ID="DiscountTextBox" runat="server"
Text='<%# Bind("Discount") %>' />
<br />
YouPay:
<asp:TextBox ID="YouPayTextBox" runat="server" Text='<%# Bind("YouPay") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
<br />
</td>
</InsertItemTemplate>
<LayoutTemplate>
<table runat="server">
<tr runat="server">
<td runat="server">
<table ID="groupPlaceholderContainer" runat="server" border="0" style="">
<tr ID="groupPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
<tr runat="server">
<td runat="server" style="">
</td>
</tr>
</table>
</LayoutTemplate>
<EmptyItemTemplate>
<td runat="server" />
</EmptyItemTemplate>
<ItemTemplate>
<td runat="server" style="">
<div id="wrapper">
<div id="ResImage">
<div id="slideshow">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval ("Image1") %>' Width="250px" Height="190px" CssClass="active" />
<asp:Image ID="Image5" runat="server" ImageUrl='<%# Eval ("Image2") %>' Width="250px" Height="190px" />
<asp:Image ID="Image4" runat="server" ImageUrl='<%# Eval ("Image3") %>' Width="250px" Height="190px" />
</div>
</div>
<div id="ResDesc">
<asp:Label ID="lblDesc" runat="server" Width="290px" Height="190px" BackColor="White" Text='<%# Eval("Offer") %>'></asp:Label>
</div>
<div id="ResPrice1">
<asp:Label ID="lblValue" runat="server" Text="Value" CssClass="ResValue"></asp:Label>
<asp:Label ID="lblDiscount" runat="server" Text="Discount" CssClass="ResDiscount"></asp:Label>
<asp:Label ID="lblYouPay" runat="server" Text="You Pay" CssClass="ResYouPay"></asp:Label>
<div id="ResPrice2">
<asp:Label ID="lblValueAmt" runat="server" Text='<%# Eval("Value") %>' CssClass="ResValueAmt"></asp:Label>
<asp:Label ID="lblDiscountAmt" runat="server" Text='<%# Eval("Discount") %>' CssClass="ResDiscountAmt"></asp:Label>
<asp:Label ID="lblYouPayAmt" runat="server" Text='<%# Eval("YouPay") %>' CssClass="ResYouPayAmt"></asp:Label>
</div>
<asp:Label ID="lblRestaurantName" runat="server" Text='<%# Eval("RestaurantName") %>'></asp:Label><br />
<asp:LinkButton ID="lnkGetCoupon" runat="server">Get Discount Coupon</asp:LinkButton>
</div>
<div id="HowItWorks">
<asp:Label ID="lblHowItWorks" runat="server" Text="How It Works?" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
<ul>
<li><asp:Label ID="Label3" runat="server" Text="1.Click on the 'Get Discount Coupon' button" Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label4" runat="server" Text="2.Get a print of your Voucher and carry it during your visit to the outlet." Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label5" runat="server" Text="3.Show your Voucher and pay the amount directly to the merchant. " Font-Size="10px"></asp:Label></li>
</ul>
</div>
</div>
</td>
</ItemTemplate>
<AlternatingItemTemplate>
<td runat="server" style="">
<div id="wrapper">
<div id="ResImage">
<div id="slideshow">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval ("Image1") %>' Width="250px" Height="190px" CssClass="active" />
<asp:Image ID="Image5" runat="server" ImageUrl='<%# Eval ("Image2") %>' Width="250px" Height="190px" />
<asp:Image ID="Image4" runat="server" ImageUrl='<%# Eval ("Image3") %>' Width="250px" Height="190px" />
</div>
</div>
<div id="ResDesc">
<asp:Label ID="lblDesc" runat="server" Width="290px" Height="190px" BackColor="White" Text='<%# Eval("Offer") %>'></asp:Label>
</div>
<div id="ResPrice1">
<asp:Label ID="lblValue" runat="server" Text="Value" CssClass="ResValue"></asp:Label>
<asp:Label ID="lblDiscount" runat="server" Text="Discount" CssClass="ResDiscount"></asp:Label>
<asp:Label ID="lblYouPay" runat="server" Text="You Pay" CssClass="ResYouPay"></asp:Label>
<div id="ResPrice2">
<asp:Label ID="lblValueAmt" runat="server" Text='<%# Eval("Value") %>' CssClass="ResValueAmt"></asp:Label>
<asp:Label ID="lblDiscountAmt" runat="server" Text='<%# Eval("Discount") %>' CssClass="ResDiscountAmt"></asp:Label>
<asp:Label ID="lblYouPayAmt" runat="server" Text='<%# Eval("YouPay") %>' CssClass="ResYouPayAmt"></asp:Label>
</div>
<asp:Label ID="lblRestaurantName" runat="server" Text='<%# Eval("RestaurantName") %>'></asp:Label><br />
<asp:LinkButton ID="lnkGetCoupon" runat="server">Get Discount Coupon</asp:LinkButton>
</div>
<div id="HowItWorks">
<asp:Label ID="lblHowItWorks" runat="server" Text="How It Works?" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
<ul>
<li><asp:Label ID="Label3" runat="server" Text="1.Click on the 'Get Discount Coupon' button" Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label4" runat="server" Text="2.Get a print of your Voucher and carry it during your visit to the outlet." Font-Size="10px"></asp:Label></li>
<li><asp:Label ID="Label5" runat="server" Text="3.Show your Voucher and pay the amount directly to the merchant. " Font-Size="10px"></asp:Label></li>
</ul>
</div>
</div>
</td>
</AlternatingItemTemplate>
<EditItemTemplate>
<td runat="server" style="">
OfferID:
<asp:Label ID="OfferIDLabel1" runat="server" Text='<%# Eval("OfferID") %>' />
<br />
RestaurantID:
<asp:TextBox ID="RestaurantIDTextBox" runat="server"
Text='<%# Bind("RestaurantID") %>' />
<br />
Offer:
<asp:TextBox ID="OfferTextBox" runat="server" Text='<%# Bind("Offer") %>' />
<br />
Value:
<asp:TextBox ID="ValueTextBox" runat="server" Text='<%# Bind("Value") %>' />
<br />
Discount:
<asp:TextBox ID="DiscountTextBox" runat="server"
Text='<%# Bind("Discount") %>' />
<br />
YouPay:
<asp:TextBox ID="YouPayTextBox" runat="server" Text='<%# Bind("YouPay") %>' />
<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<br />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
<br />
</td>
</EditItemTemplate>
<GroupTemplate>
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</GroupTemplate>
<SelectedItemTemplate>
<td runat="server" style="">
OfferID:
<asp:Label ID="OfferIDLabel" runat="server" Text='<%# Eval("OfferID") %>' />
<br />
RestaurantID:
<asp:Label ID="RestaurantIDLabel" runat="server"
Text='<%# Eval("RestaurantID") %>' />
<br />
Offer:
<asp:Label ID="OfferLabel" runat="server" Text='<%# Eval("Offer") %>' />
<br />
Value:
<asp:Label ID="ValueLabel" runat="server" Text='<%# Eval("Value") %>' />
<br />
Discount:
<asp:Label ID="DiscountLabel" runat="server" Text='<%# Eval("Discount") %>' />
<br />
YouPay:
<asp:Label ID="YouPayLabel" runat="server" Text='<%# Eval("YouPay") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:databaseConnectionString %>"
SelectCommand="SELECT RestaurantOffers.RestaurantID, RestaurantOffers.Offer, RestaurantOffers.Value, RestaurantOffers.Discount, RestaurantOffers.YouPay, RestaurantName.RestaurantName, RestaurantName.Address, RestaurantName.PhoneNumber, RestaurantName.Image1, RestaurantName.Image2, RestaurantName.Image3, RestaurantOffers.OfferID FROM RestaurantName INNER JOIN RestaurantOffers ON RestaurantName.RestaurantID = RestaurantOffers.RestaurantID ORDER BY NEWID() "
ConflictDetection="CompareAllValues"
DeleteCommand="DELETE FROM [RestaurantOffers] WHERE [OfferID] = #original_OfferID AND [RestaurantID] = #original_RestaurantID AND (([Offer] = #original_Offer) OR ([Offer] IS NULL AND #original_Offer IS NULL)) AND (([Value] = #original_Value) OR ([Value] IS NULL AND #original_Value IS NULL)) AND (([Discount] = #original_Discount) OR ([Discount] IS NULL AND #original_Discount IS NULL)) AND (([YouPay] = #original_YouPay) OR ([YouPay] IS NULL AND #original_YouPay IS NULL))"
InsertCommand="INSERT INTO [RestaurantOffers] ([OfferID], [RestaurantID], [Offer], [Value], [Discount], [YouPay]) VALUES (#OfferID, #RestaurantID, #Offer, #Value, #Discount, #YouPay)"
OldValuesParameterFormatString="original_{0}"
UpdateCommand="UPDATE [RestaurantOffers] SET [RestaurantID] = #RestaurantID, [Offer] = #Offer, [Value] = #Value, [Discount] = #Discount, [YouPay] = #YouPay WHERE [OfferID] = #original_OfferID AND [RestaurantID] = #original_RestaurantID AND (([Offer] = #original_Offer) OR ([Offer] IS NULL AND #original_Offer IS NULL)) AND (([Value] = #original_Value) OR ([Value] IS NULL AND #original_Value IS NULL)) AND (([Discount] = #original_Discount) OR ([Discount] IS NULL AND #original_Discount IS NULL)) AND (([YouPay] = #original_YouPay) OR ([YouPay] IS NULL AND #original_YouPay IS NULL))">
<DeleteParameters>
<asp:Parameter Name="original_OfferID" Type="String" />
<asp:Parameter Name="original_RestaurantID" Type="String" />
<asp:Parameter Name="original_Offer" Type="String" />
<asp:Parameter Name="original_Value" Type="String" />
<asp:Parameter Name="original_Discount" Type="String" />
<asp:Parameter Name="original_YouPay" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="RestaurantID" Type="String" />
<asp:Parameter Name="Offer" Type="String" />
<asp:Parameter Name="Value" Type="String" />
<asp:Parameter Name="Discount" Type="String" />
<asp:Parameter Name="YouPay" Type="String" />
<asp:Parameter Name="original_OfferID" Type="String" />
<asp:Parameter Name="original_RestaurantID" Type="String" />
<asp:Parameter Name="original_Offer" Type="String" />
<asp:Parameter Name="original_Value" Type="String" />
<asp:Parameter Name="original_Discount" Type="String" />
<asp:Parameter Name="original_YouPay" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="OfferID" Type="String" />
<asp:Parameter Name="RestaurantID" Type="String" />
<asp:Parameter Name="Offer" Type="String" />
<asp:Parameter Name="Value" Type="String" />
<asp:Parameter Name="Discount" Type="String" />
<asp:Parameter Name="YouPay" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<!-- end .content --></div>
<div class="footer">
<!-- end .footer --></div>
<!-- end .container --></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", { imgDown: "SpryAssets/SpryMenuBarDownHover.gif", imgRight: "SpryAssets/SpryMenuBarRightHover.gif" });
</script>
</form>
</body>
</html>
jQuery is only finding the first row in the list view marked with an id of slideshow. From http://api.jquery.com/id-selector/:
For id selectors, jQuery uses the
JavaScript function
document.getElementById(), which is
extremely efficient.
Each id value must be used only once
within a document. If more than one
element has been assigned the same ID,
queries that use that ID will only
select the first matched element in
the DOM. This behavior should not be
relied on, however; a document with
more than one element using the same
ID is invalid.
Try using a class instead to select your elements.
I didn't try this, but just trying to get you in the right direction... change:
<div id="slideshow">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval ("Image1") %>' Width="250px" Height="190px" CssClass="active" />
<asp:Image ID="Image5" runat="server" ImageUrl='<%# Eval ("Image2") %>' Width="250px" Height="190px" />
<asp:Image ID="Image4" runat="server" ImageUrl='<%# Eval ("Image3") %>' Width="250px" Height="190px" />
</div>
to
<div class="slideshow">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval ("Image1") %>' Width="250px" Height="190px" CssClass="active" />
<asp:Image ID="Image5" runat="server" ImageUrl='<%# Eval ("Image2") %>' Width="250px" Height="190px" />
<asp:Image ID="Image4" runat="server" ImageUrl='<%# Eval ("Image3") %>' Width="250px" Height="190px" />
</div>
and anywhere your jquery has #slideshow to .slideshow

Resources