Div positioning within a webpage - c#

Edit:
Current layout:
Im trying to work out how within my ASP webpage design I can posistion a div (server side) under another div.
To my question further I'll use the following screenshots:
Currently this is my layout:
I want to position 2 more div one under another to give me a 'title' div and a 'description' div tat will later be populated by my database results, as shown:
This is my current source code. Can someone push me in the right direction of how i go about implementing these divs one of top of another like this?
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="ViewCDs.Show" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div style=" float:left;">
<asp:Image ID="Image1" runat="server" Height="145px" ViewStateMode="Enabled"
Width="185px" />
</div>
<div style=" float:left; width: 395px; height: 140px;">
<asp:FormView ID="FormView1" runat="server">
<EditItemTemplate>
coffeeName:
<asp:TextBox ID="coffeeNameTextBox" runat="server"
Text='<%# Bind("coffeeName") %>' />
<br />
coffeeOrigin:
<asp:TextBox ID="coffeeOriginTextBox" runat="server"
Text='<%# Bind("coffeeOrigin") %>' />
<br />
coffeeStrength:
<asp:TextBox ID="coffeeStrengthTextBox" runat="server"
Text='<%# Bind("coffeeStrength") %>' />
<br />
coffeeGrind:
<asp:TextBox ID="coffeeGrindTextBox" runat="server"
Text='<%# Bind("coffeeGrind") %>' />
<br />
coffeePrice:
<asp:TextBox ID="coffeePriceTextBox" runat="server"
Text='<%# Bind("coffeePrice") %>' />
<br />
coffeeQty:
<asp:TextBox ID="coffeeQtyTextBox" runat="server"
Text='<%# Bind("coffeeQty") %>' />
<br />
coffeeRRP:
<asp:TextBox ID="coffeeRRPTextBox" runat="server"
Text='<%# Bind("coffeeRRP") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
coffeeName:
<asp:TextBox ID="coffeeNameTextBox" runat="server"
Text='<%# Bind("coffeeName") %>' />
<br />
coffeeOrigin:
<asp:TextBox ID="coffeeOriginTextBox" runat="server"
Text='<%# Bind("coffeeOrigin") %>' />
<br />
coffeeStrength:
<asp:TextBox ID="coffeeStrengthTextBox" runat="server"
Text='<%# Bind("coffeeStrength") %>' />
<br />
coffeeGrind:
<asp:TextBox ID="coffeeGrindTextBox" runat="server"
Text='<%# Bind("coffeeGrind") %>' />
<br />
coffeePrice:
<asp:TextBox ID="coffeePriceTextBox" runat="server"
Text='<%# Bind("coffeePrice") %>' />
<br />
coffeeQty:
<asp:TextBox ID="coffeeQtyTextBox" runat="server"
Text='<%# Bind("coffeeQty") %>' />
<br />
coffeeRRP:
<asp:TextBox ID="coffeeRRPTextBox" runat="server"
Text='<%# Bind("coffeeRRP") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
<b>Origin:</b>
<asp:Label ID="coffeeOriginLabel" runat="server"
Text='<%# Bind("coffeeOrigin") %>' />
<br />
<br />
<b>Grind:</b>
<asp:Label ID="coffeeGrindLabel" runat="server"
Text='<%# Bind("coffeeGrind") %>' />
<br />
<br />
<b>Price: £</b>
<asp:Label ID="coffeePriceLabel" runat="server"
Text='<%# Bind("coffeePrice") %>' />
<br />
<br />
<b>Strength:</b>
<asp:Label ID="coffeeStrengthLabel" runat="server"
Text='<%# Bind("coffeeStrength") %>' />
<br />
<br />
<b>Stock Level:</b>
<asp:Label ID="coffeeQtyLabel" runat="server" Text='<%# Bind("coffeeQty") %>' />
<br />
</ItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CoffeeConnectionString %>"
SelectCommand="SELECT [coffeeName], [coffeeOrigin], [coffeeStrength], [coffeeGrind], [coffeePrice], [coffeeQty], [coffeeRRP] FROM [Coffees]">
</asp:SqlDataSource>
<br />
</div>
<div style=" float:left; width: 339px; height: 140px;">
<br />
<div style=" float:left; width: 165px; height: 25px;">
<b><asp:Label ID="Label1" runat="server" Text="Select Coffee Grind:"></asp:Label> </b>
</div>
<div style=" float:right; width: 165px; height: 25px;">
<asp:DropDownList ID="DropDownList1" runat="server" Height="21px" Width="161px">
<asp:ListItem>Beans</asp:ListItem>
<asp:ListItem>Smooth</asp:ListItem>
<asp:ListItem>Course</asp:ListItem>
</asp:DropDownList>
</div>
<div style=" float:left; width: 165px; height: 40px;">
<br />
<b><asp:Label ID="Label2" runat="server" Text="Quantity:"></asp:Label></b>
</div>
<div style=" float:right; width: 165px; height: 40px;">
<br />
<asp:TextBox ID="TextBox1" runat="server" Width="40px">1</asp:TextBox>
</div>
<div style=" float:left; width: 165px; height: 40px;">
<br />
<asp:Button ID="Button1" runat="server" Text="Buy" />
</div>
</div>

You would simply need to add two more divs beneath that code.
<div id="title"> </div> <br/>
<div id="description"> </div> <br/>
However if you would like to control their attributes such as visibility then you would just need to make those asp.net panels.
<asp:Panel runat="server" ID="title"> </asp:Panel> <br/>
<asp:Panel runat="server" ID="description"> </asp:Panel> <br/>

Related

Why does asp.net display table name instead of table field

im working on a project and im combining 3 tables the tables are already associated in the dbml but my problem is when i use the data list it diaplays my table names not the correct fields this is a college assignment but i have tried everything i know to do.
I've tried to combine them seperatly in sql manager in vs but im just not understanding why it isn't showing the correct thing
<form id="form1" runat="server">
<div>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="assign_6_final.DataClasses1DataContext" EntityTypeName="" Select="new (CustomerID, Name)" TableName="Customers">
</asp:LinqDataSource>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="LinqDataSource1" DataTextField="Name" DataValueField="CustomerID" OnSelectedIndexChanged="Page_Load">
</asp:DropDownList>
<asp:DataList ID="DataList1" runat="server" DataSourceID="LinqDataSource2" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" OnSelectedIndexChanged="DataList1_SelectedIndexChanged" OnDataBinding="DataList1_SelectedIndexChanged">
<ItemTemplate>
IncidentID:
<asp:Label ID="IncidentIDLabel" runat="server" Text='<%# Eval("IncidentID") %>' />
<br />
DateOpened:
<asp:Label ID="DateOpenedLabel" runat="server" Text='<%# Eval("DateOpened") %>' />
<br />
DateClosed:
<asp:Label ID="DateClosedLabel" runat="server" Text='<%# Eval("DateClosed") %>' />
<br />
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
<br />
Description:
<asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' />
<br />
CustomerID:
<asp:Label ID="CustomerIDLabel" runat="server" Text='<%# Eval("CustomerID") %>' />
<br />
Technician:
<asp:Label ID="TechnicianLabel" runat="server" Text='<%# Eval("Technician") %>' />
<br />
Product:
<asp:Label ID="ProductLabel" runat="server" Text='<%# Eval("Product") %>' />
<br />
<br />
<br />
</ItemTemplate>
</asp:DataList>
</div>
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="assign_6_final.DataClasses1DataContext" EntityTypeName="" Select="new (IncidentID, DateOpened, DateClosed, Title, Description, CustomerID, Technician, Product)" TableName="Incidents" Where="CustomerID = #CustomerID">
<WhereParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="CustomerID" PropertyName="SelectedValue" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
<asp:EntityDataSource ID="EntityDataSource1" runat="server">
</asp:EntityDataSource>
</form>
</body>
the outcome i expected was that the last 2 items the product and technician would output correctly but they haven't and im kind of lost my teacher said this is a common problem in asp but ive never seen it
Try using the following and so forth:
<%# DataBinder.Eval(Container.DataItem,"CustomerID") %>

HoverMenuExtender only works after postback in gridview

HoverMenuExtender only works after postback in gridview. Weird behavior.
<asp:TemplateField>
<HeaderStyle CssClass="CenterAligner" />
<ItemTemplate>
<asp:Image ID="imgNotes" runat="server" ImageUrl="Images/information.png" Style="position: relative" />
<asp:Panel ID="pnlNotes" runat="server" BackColor="GhostWhite" BorderColor="Black" BorderStyle="Solid" BorderWidth="1" Width="500px" Visible="true">
<div style="position: relative">
<div style="padding: 10px; margin: 10px; text-align: justify">
<asp:Label ID="lblCreditInfo" runat="server" Font-Size="9pt" ForeColor="Black"></asp:Label>
<asp:Label ID="lblCreditWebSite" runat="server" Font-Size="9pt" Text='<%# Bind("CreditWebSite") %>' Visible="false"></asp:Label>
<asp:Label ID="lblCreditUserName" runat="server" Font-Size="9pt" Text='<%# Bind("CreditUserName") %>' Visible="false"></asp:Label>
<asp:Label ID="lblCreditPassword" runat="server" Font-Size="9pt" Text='<%# Bind("CreditPassword") %>' Visible="false"></asp:Label>
</div>
<br />
</div>
</asp:Panel>
<ajaxToolkit:HoverMenuExtender ID="hmeNotes" runat="server" PopupControlID="pnlNotes" PopupPosition="left" TargetControlID="imgNotes">
</ajaxToolkit:HoverMenuExtender>
</ItemTemplate>
<ItemStyle HorizontalAlign="center" />
<HeaderStyle HorizontalAlign="Left" />
</asp:TemplateField>
Before Postback After Postback
I was missing the panel for the balloon extender that was also on the page.

Replace a TextBox based on DropDownList choice

When I choose an element from DropDownList, I want a TexBox to disappear and to be replaced by another one in the same exact position.
For example: I have a DropDownList filled with categories of SI equipments, Laptop, Desktop, Display etc. So when I choose Display, the RAM, CPU, HARD DISK textboxes must disappear and INCH TextBox should replace RAM TextBox.
This is my code:
<div>
<label id="l1" class="label" >Numéro de série:</label>
<asp:TextBox ID="NumSerie" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l8" class="label"> Systeme d'exploitation: </label>
<asp:TextBox ID="SystemEx" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<asp:Button class="NButton" ID="Button1" runat="server" Height="38px" Text="Ajouter" Width="140px" OnClick="Button1_Click" />
</div>
<div>
<label id="l2" class="label">Désignation:</label>
<asp:TextBox ID="Designation" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l9" class="label"> Processeur:</label>
<asp:TextBox ID="Cpu" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<asp:Button CssClass="NButton" ID="Button2" runat="server" Height="38px" Text="Modifier" Width="140px" />
</div>
<div>
<label id="l3" class="label">
<asp:TextBox ID="Marque" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l10" class="label">Ram: </label>
<asp:TextBox ID="Ram" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<asp:Button CssClass="NButton" ID="Button3" runat="server" Height="38px" Text="Supprimer" Width="140px" />
</div>
<div>
<label id="l4" class="label">
<br />
Catégorie:</label>
<asp:DropDownList ID="IdCategorie" CssClass="textbox" runat="server" Height="32px" Width="200px"/>
<label id="l11" class="label"> Capacité destockage:</label>
<asp:TextBox ID="CapaciteSt" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<asp:Button CssClass="NButton" ID="Button4" runat="server" Height="38px" Text="Rechercher" Width="140px" />
</div>
<div>
<label id="l5" class="label">
<br />
Code de fournisseur:</label>
<asp:DropDownList ID="CodeFour" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l12" class="label"></label>
<asp:TextBox ID="Remise" class="textbox" runat="server" Height="32px" Width="200px" />
<asp:Label ID="l15" runat="server" CssClass="label" Text="ID Equi:"></asp:Label>
<asp:TextBox CssClass="Rtextbox" ID="TextBox1" runat="server" Height="22px" Width="70px"></asp:TextBox>
</div>
<div>
<label id="l6" class="label"></label>
<asp:TextBox ID="Prix" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l13" class="label">Modele </label>
<asp:TextBox Id="Modele" CssClass="textbox" runat="server" Height="32px" Width="200px" />
</div>
<div>
<label id="l7" class="label"> </label>
<asp:TextBox ID="EtatGarantie" CssClass="textbox" runat="server" Height="32px" Width="200px" />
<label id="l14" class="label"></label>
<asp:TextBox ID="Pouces" CssClass="textbox" runat="server" Height="32px" Width="200px" />
</div>
<asp:Button CssClass="NButton" ID="Button5" runat="server" Text="<<" Width="55px" />
There is no need to replace the textbox. but it depends on if different selected items have different number of texboxes.
First set on your DropDownList AutoPostBack="true" then
You can simply change the placeholde runtime on SelectedIndexChanged of DropDownList like this
protected void ddlProducts_SelectedIndexChanged(object sender, EventArgs e)
{
txtDOB.Attributes.Add("placeholder", ddlProducts.SelectedItem.Text);
}
you can use same textbox for any item you selected.

Passing Eval value to C# method for shopping cart

I am creating a shopping cart web app for my class. When the user clicks on the add to cart button, I want to pass the value of the ID of each specific product to a separate method in the code behind. Not sure if my syntax is off or if this just wont work. Here is my mark up:
<asp:Button ID="AddToCart" CommandName="Add"
OnClientClick ='<%# ListView1_AddToCart(Eval("ID"))%>'
CssClass ="Button" runat="server" Text="Add to Cart" />
Here is my code behind:
public void ListView1_AddToCart(string CatID)
{cart.AddToCart(CatID);}
I keep getting various issues, but this gives me the following error:
The best overloaded method match for 'OurCats_GrumpyCats.ListView1_AddToCart(string)'
has some invalid arguments.
How can I resolve this? Is there any better way?
EDIT: Here is my mark up
<%# Page Title="All Cats" Language="C#" MasterPageFile="~/MasterPage/Layout.master" AutoEventWireup="true" CodeFile="AllCats.aspx.cs" Inherits="OurCats_GrumpyCats" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<h1>Meet all of our kittens!</h1>
<asp:ListView ID="ListView1" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource2">
<EmptyDataTemplate>
<span>No data was returned.</span>
</EmptyDataTemplate>
<InsertItemTemplate>
<span style="">ID:
<asp:TextBox ID="IDTextBox" runat="server" Text='<%# Bind("ID") %>' />
<br />
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
<br />
Price:
<asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price") %>' />
<br />
Imgu:
<asp:TextBox ID="ImguTextBox" runat="server" Text='<%# Bind("Img") %>' />
<br />
Description:
<asp:TextBox ID="DescriptionTextBox" runat="server" Text='<%# Bind("Description") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
<br />
<br />
</span>
</InsertItemTemplate>
<ItemTemplate>
<table class ="Table" style="border-style: solid; ">
<tr>
<td >
<a href ="Details.aspx?ID=<%# Eval("ID")%>">
<img src="../Images/<%# Eval("Img") %>" width ="200" />
</a>
</td>
<td style="width:700px; margin-left: 100px">
<asp:Label ID="Label1" runat="server" Text="Name: "></asp:Label><asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
<asp:Textbox ID="CatID" runat="server" Visible="false" Text='<%# Eval("ID")%>'></asp:Textbox>
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="Price: $"></asp:Label><asp:Label ID="PriceLabel" runat="server" Text= '<%# Eval("Price") %>'/>
<br />
<br />
<asp:Label ID="Label3" runat="server" Text="Description: "></asp:Label><asp:Label ID="DescriptionLabel" runat="server" Text= '<%# Eval("Description") %>' />
<br />
<br />
<asp:Button ID="AddToCart" CommandName="Add" OnClientClick='<%# "AddToCart(" +Eval("ID") + " );" %>' CssClass ="Button" runat="server" Text="Add to Cart" />
</td>
</tr>
</table>
</ItemTemplate>
<LayoutTemplate>
<div id="itemPlaceholderContainer" runat="server" style =" margin-left :30px;">
<span runat="server" id="itemPlaceholder" />
</div>
<div style="">
</div>
</LayoutTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:420_Project_GLConnectionString1 %>" SelectCommand="SELECT * FROM [OurCats]">
</asp:SqlDataSource>
</asp:Content>
try below code
<asp:Button ID="AddToCart" CommandName="Add"
OnClientClick ='<%# ListView1_AddToCart((string)Eval("ID"))%>'
CssClass ="Button" runat="server" Text="Add to Cart" />
OnClientClick ='<%# "ListView1_AddToCart(" +Eval("ID") + " );" %>'

Loading GridView on scrolling down

I have a UserControl which is a nested GridView (facebook like wall), i want to load posts on scrolling down. I am following this article..
CLICK ME
The problem is that this method is using the first column's last row to get the last productid
something like this
var lastProductId = $("#GridViewUserScraps tr:last").children("td:first").html();
But in my case i am not displaying any id in any of the columns of the UserControl's GridView though i have a ScrapId column(primary key) in database. How can i load Posts on scrolling down? how can i make it work?
My UserControl:
<div id="divProducts" style="height:700px;overflow:auto">
<asp:GridView ID="GridViewUserScraps" ItemStyle-VerticalAlign="Top" AutoGenerateColumns="False"
GridLines="None" Width="100%" ShowHeader="False" runat="server" AlternatingRowStyle-BackColor="#A5A5A5"
CellPadding="4" ForeColor="#333333" DataKeyNames="ScrapId" OnRowCommand="GridViewRowCommand">
<Columns>
<asp:TemplateField>
<FooterTemplate>
<asp:LinkButton ID="LinkButton1" runat="server">Load More</asp:LinkButton>
</FooterTemplate>
<ItemTemplate>
<table align="left" cellpadding="1" cellspacing="2">
<tr>
<td>
<a href='<%#getUserHREF(Container.DataItem)%>'>
<img align="middle" src='<%#getSRC(Container.DataItem)%>' border="0" width="50px" /></a>
</td>
<td>
</td>
</tr>
</table>
<div align="justify">
<b>
<%#DataBinder.Eval(Container.DataItem,"firstname")%>
<div>
<asp:HiddenField ID="hiddenLastProductID" runat="server" Value='<%# Eval("id") %>' />
</div>
</b>
<br />
<%#DataBinder.Eval(Container.DataItem, "Message")%>
<br />
<asp:Image ID="Image" runat="server" ImageUrl='<%# Eval("url") %>' style="max-width:500px;" />
</div>
<span class="SmallBlackText">Posted On: </span>
<asp:Label ID="lblSendDate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"SendDate")%>'></asp:Label>
</span>
<br />
<%-- <asp:LinkButton ID="lnklike" runat="server"
CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
CommandName="LikeCmd">Like</asp:LinkButton>
<asp:LinkButton ID="lnkunlike" runat="server">unlike</asp:LinkButton>--%>
<asp:ImageButton ID="lnklike" runat="server" ImageUrl="~/Images/thumbsup.png" Height="20px"
Width="20px" CommandName="like" CommandArgument='<%# Eval("ScrapId")%>' />
<asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lnklike" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Controls_GetUserScraps.abc((int)Eval("ScrapId")) %>' />
</ContentTemplate>
</asp:UpdatePanel>
<%--<asp:Label ID="Label1" runat="server" Text='<%# WebPageName.StaticMethodName((int)Eval("ScrapId")) %>' />--%>
<asp:ImageButton ID="lnkunlike" runat="server" CommandArgument='<%# Eval("ScrapId")%>'
CommandName="unlike" Height="20px" ImageUrl="~/Images/thumbsdown.png" Width="20px" />
<asp:UpdatePanel runat="server" ID="UpdatePanel2" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lnkunlike" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Controls_GetUserScraps.xyz((int)Eval("ScrapId")) %>'></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<asp:LinkButton ID="lnkcomment" runat="server">Comment</asp:LinkButton>
<asp:LinkButton ID="lnkviewall" runat="server" CommandName="viewall" CommandArgument='<%# Eval("ScrapId")%>'>View All</asp:LinkButton>
<br />
<asp:Panel ID="Pnlchildgrid" runat="server">
<asp:GridView ID="childgrid" runat="server" AutoGenerateColumns="False" OnRowCommand="childgrid_RowCommand"
Style="width: 450px; float: right;">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table align="left" cellpadding="1" cellspacing="2">
<tr>
<td>
<a href='<%#getUserHREF(Container.DataItem)%>'>
<img align="middle" src='<%#getSRC(Container.DataItem)%>' border="0" width="30px" /></a>
</td>
<td>
</td>
</tr>
</table>
<div align="justify">
<b>
<%#DataBinder.Eval(Container.DataItem, "firstname")%></b><br />
<%#DataBinder.Eval(Container.DataItem, "commentmsg")%>
<br />
</div>
<span class="SmallBlackText">Posted On: </span>
<asp:Label ID="lblSendDate" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"SendDate")%>'></asp:Label>
</span>
<br />
<asp:ImageButton ID="lnklike" runat="server" Height="20" Width="20" CommandName="childlike"
CommandArgument='<%# Eval("commentid")%>' ImageUrl="~/Images/thumbsup.png" />
<asp:Label ID="Label1" runat="server" Text='<%# Controls_GetUserScraps.abc1((int)Eval("commentid")) %>' />
<asp:ImageButton ID="lnkunlike" runat="server" CommandArgument='<%# Eval("commentid")%>'
CommandName="childunlike" Height="20" ImageUrl="~/Images/thumbsdown.png" Width="20" />
<asp:Label ID="Label2" runat="server" Text='<%# Controls_GetUserScraps.xyz1((int)Eval("commentid")) %>'></asp:Label>
<%-- <asp:LinkButton ID="lnkcomment" runat="server">Comment11111</asp:LinkButton>--%>
<br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<br />
<asp:Panel ID="Panel1" runat="server">
<asp:TextBox ID="txtcomment" runat="server" Width="500px" ></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Comment" CommandName="comment" CommandArgument='<%# Eval("ScrapId")%>' />
</asp:Panel>
</asp:Panel>
<br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle BackColor="#EFF3FB" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</div>

Categories

Resources