Okay. I'm gonna ask it again with full clear explanations.I want to add a label text message on my admin.aspx like this (please see the image below...i just edit it in paint so that you can see the output)
In my case. I want to count the records that in-pending. Then there will be a label text message that notify how many records are in-pending. What is the code for that label text message? Here's my code for my Pending Records Page (Pending.aspx).\[code\]<%@ Page Language="C#" Debug="true" %><%@ Import Namespace="System" %><%@ Import Namespace="System.Data" %><%@ Import Namespace = "System.Data.SqlClient" %><%@ Import Namespace= "System.Data.OleDb" %><title>Pending Records</title><head><style type="text/css">.style1 { background-image: url('images/pending.jpg');}.style2 { margin-bottom: 0px;}</style><script type="text/javascript"><!--function FP_swapImgRestore() {//v1.0 var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) { var elm=doc.$imgSwaps; if(elm) { elm.src=http://stackoverflow.com/questions/14422510/elm.$src; elm.$src=null; } } doc.$imgSwaps=null; }}function FP_swapImg() {//v1.0 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } }}function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; }}function FP_getObjectByID(id,o) {//v1.0 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id); else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el; if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c) for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; } f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements; for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } } return null;}// --></script></head><script runat="server" type="css">protected void PendingRecordsGridview_PageIndexChanging(object sender, GridViewPageEventArgs e){ PendingRecordsGridview.PageIndex = e.NewPageIndex; PendingRecordsGridview.DataBind();}protected void Page_Load(object sender, EventArgs e){}protected void PendingRecordsGridview_RowCommand(object sender, GridViewCommandEventArgs e){ if (e.CommandName == "accept") { Session["ID"] = e.CommandArgument.ToString(); OleDbConnection con = new OleDbConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); con.Open(); OleDbCommand cmd1 = new OleDbCommand("INSERT INTO DriversRecords (ID, FirstName, LastName, MiddleName, Address, Gender, ContactNumber, PlateNumber, Color, Brand, LiscensedNumber, [Image]) SELECT ID, FirstName, LastName, MiddleName, Address, Gender, ContactNumber, PlateNumber, Color, Brand, LiscensedNumber, [Image] FROM PendingRecords where ID="+Session["ID"].ToString()+"", con); OleDbCommand cmd2 = new OleDbCommand("delete from PendingRecords where ID="+Session["ID"].ToString()+"", con); cmd1.ExecuteNonQuery(); cmd2.ExecuteNonQuery(); PendingRecordsGridview.DataBind(); }}public void PendingRecordsGridview_RowDeleting(Object sender, GridViewDeleteEventArgs e){}</script><body onload="FP_preloadImgs(/*url*/'images/backhover.jpg')" style="margin: 0; background-color: #808080"><form id="form1" runat="server" class="style2" style="height: 646px"><table style="width: 1150px; height: 646px" cellspacing="0" cellpadding="0" align="center" class="style1"> <!-- MSTableType="layout" --> <tr> <td> </td> <td></td> <td> </td> <td> </td> <td> </td> <td> </td> <td style="height: 98px"> </td> </tr> <tr> <td> </td> <td></td> <td valign="top"><a href="http://stackoverflow.com/questions/14422510/passwordprotect.asp"> <img alt="" src="http://stackoverflow.com/questions/14422510/images/back.jpg" width="83" height="32" id="img1" onmouseout="FP_swapImgRestore()" onmouseover="FP_swapImg(1,1,/*id*/'img1',/*url*/'images/backhover.jpg')"></a></td> <td> </td> <td> </td> <td> </td> <td style="height: 36px"> </td> </tr> <tr> <td> </td> <td></td> <td> </td> <td> </td> <td> </td> <td> </td> <td style="height: 23px"> </td> </tr> <tr> <td> </td> <td></td> <td> </td> <td> </td> <td valign="top"><asp:SqlDataSource runat="server" id="sd1" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [PendingRecords]" DeleteCommand="DELETE FROM [PendingRecords] WHERE [ID] = ?" InsertCommand="INSERT INTO [PendingRecords] ([Username], [Password], [FirstName], [LastName], [MiddleName], [Address], [Gender], [ContactNumber], [PlateNumber], [Color], [Brand], [LiscensedNumber]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [PendingRecords] SET [Username] = ?, [Password] = ?, [FirstName] = ?, [LastName] = ?, [MiddleName] = ?, [Address] = ?, [Gender] = ?, [ContactNumber] = ?, [PlateNumber] = ?, [Color] = ?, [Brand] = ?, [LiscensedNumber] = ? WHERE [ID] = ?"> <DeleteParameters> <asparameter Name="ID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asparameter Name="Username" Type="String" /> <asparameter Name="Password" Type="String" /> <asparameter Name="FirstName" Type="String" /> <asparameter Name="LastName" Type="String" /> <asparameter Name="MiddleName" Type="String" /> <asparameter Name="Address" Type="String" /> <asparameter Name="Gender" Type="String" /> <asparameter Name="ContactNumber" Type="String" /> <asparameter Name="PlateNumber" Type="String" /> <asparameter Name="Color" Type="String" /> <asparameter Name="Brand" Type="String" /> <asparameter Name="LiscensedNumber" Type="String" /> <asparameter Name="ID" Type="Int32" /> </UpdateParameters> <InsertParameters> <asparameter Name="Username" Type="String" /> <asparameter Name="Password" Type="String" /> <asparameter Name="FirstName" Type="String" /> <asparameter Name="LastName" Type="String" /> <asparameter Name="MiddleName" Type="String" /> <asparameter Name="Address" Type="String" /> <asparameter Name="Gender" Type="String" /> <asparameter Name="ContactNumber" Type="String" /> <asparameter Name="PlateNumber" Type="String" /> <asparameter Name="Color" Type="String" /> <asparameter Name="Brand" Type="String" /> <asparameter Name="LiscensedNumber" Type="String" /> </InsertParameters></asp:SqlDataSource> </td> <td> </td> <td style="height: 33px;"> </td> </tr> <tr> <td> </td> <td></td> <td> </td> <td> </td> <td> </td> <td> </td> <td style="height: 30px"> </td> </tr> <tr> <td> </td> <td valign="top" colspan="5"><asp:GridView OnPageIndexChanging="PendingRecordsGridview_PageIndexChanging" ID="PendingRecordsGridview" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" OnRowcommand="PendingRecordsGridview_RowCommand" DataSourceID="sd1" BorderStyle="Ridge" BackColor="White" BorderColor="Black" BorderWidth="3px" CellPadding="4" Width="1089px" PageSize="2" AllowPaging="True" OnRowDeleting="PendingRecordsGridview_RowDeleting"> <RowStyle ForeColor="#003399" HorizontalAlign="Center" /> <Columns> <asp:templatefield HeaderText="Accept"> <ItemTemplate> <asp:Button CommandArgument='<%# Bind("ID") %>' ID="Button1" runat="server" CausesValidation="false" CommandName="accept" Text="Accept" /> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Ignore"> <ItemTemplate> <asp:Button ID="deleteButton" runat="server" CommandName="Delete" Text="Ignore" CausesValidation="False" OnClientClick="return confirm('Are you sure you want to cancel this request?');" /> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="First Name" SortExpression="FirstName"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("FirstName") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label3" runat="server" Text='<%# Bind("FirstName") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Last Name" SortExpression="LastName"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("LastName") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label4" runat="server" Text='<%# Bind("LastName") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Middle Name" SortExpression="MiddleLastName"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MiddleName") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# Bind("MiddleName") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Address" SortExpression="Address"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Address") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label6" runat="server" Text='<%# Bind("Address") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Gender" SortExpression="Gender"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Gender") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label7" runat="server" Text='<%# Bind("Gender") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Contact No." SortExpression="ContactNumber"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ContactNumber") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label18" runat="server" Text='<%# Bind("ContactNumber") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Plate No." SortExpression="PlateNumber"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("PlateNumber") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label19" runat="server" Text='<%# Bind("PlateNumber") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Mobile Color" SortExpression="Color"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Color") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label11" runat="server" Text='<%# Bind("Color") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Brand" SortExpression="Brand"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Brand") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label12" runat="server" Text='<%# Bind("Brand") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield HeaderText="Liscenced No." SortExpression="LiscensedNumber"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("LiscensedNumber") %>'> </asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label10" runat="server" Text='<%# Bind("LiscensedNumber") %>'> </asp:Label> </ItemTemplate> </asp:templatefield> <asp:templatefield> <HeaderTemplate> Image </HeaderTemplate> <ItemTemplate> <img src="http://stackoverflow.com/questions/14422510/data:image/jpg;base64,<%# Eval("Image") != System.DBNull.Value ? Convert.ToBase64String((byte[])Eval("Image")) : string.Empty %>" alt="image" height="85" width="85" /> </ItemTemplate> </asp:templatefield> </Columns> <FooterStyle BackColor="#99CCCC" ForeColor="#003399" /> <PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="#003399" /> <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" /> <HeaderStyle BackColor="#A0A0A0" Font-Bold="True" ForeColor="#003399" HorizontalAlign="Center" /> <AlternatingRowStyle BorderColor="Black" BorderWidth="3px" BorderStyle="Ridge" /> </asp:GridView> </td> <td style="height: 333px"> </td> </tr> <tr> <td style="width: 29px"> </td> <td style="width: 3px"></td> <td style="width: 95px"> </td> <td style="width: 33px"> </td> <td style="width: 542px"> </td> <td style="width: 422px"> </td> <td style="height: 93px; width: 26px"> </td> </tr></table></form> \[/code\]