Solved

VS 2005 Intellisense does not recognize web controls in DataGrid ItemTemplates

Posted on 2008-06-24
2
747 Views
Last Modified: 2010-04-21
I am unable to coax my codebehind page intellisense (Visual Studio 2005) to recognize any of my ASP:Label controls that are embedded within ItemTemplates of a DataGrid Control.  
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GISCart.aspx.cs" Inherits="GISCart" %>
 
<!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>County of Ventura GIS MapStore</title>
    <link href="Styles.css" rel="stylesheet" type="text/css" />
</head>
<body style="margin-top:0; margin-left:0;">
    <form id="form1" runat="server">
    <!-- #include file="includes/Header.aspx" -->
			
			<!-- #include file="includes/NavBarMenu.aspx" -->				
			
			<table cellspacing="0" cellpadding="0" width="800" border="0">
				<tr>
					<td style="width:50px">&nbsp;
					</td>
					<td style="width:250px">&nbsp;</td>
					<td style="text-align:right; width:150px">&nbsp;</td>					
					<td style="text-align:right; width:200px"><asp:hyperlink id="Catalog" runat="server"  Font-Names="Verdana,Arial" Font-Size="Small" NavigateUrl="mapstore.aspx">Return to Catalog</asp:hyperlink></td>
					<td style="text-align:right; width:100px"><asp:hyperlink id="Checkout" runat="server"  Font-Names="Verdana,Arial" Font-Size="Small" NavigateUrl="checkout.aspx">Checkout</asp:hyperlink></td>
					<td style="width:50px">&nbsp;</td>
				</tr>
			</table>
			<!-- This table is for the page header -->
			<table cellspacing="0" cellpadding="0" width="800" border="0">
				<tr>
					<td style="width:20px">&nbsp;</td>
					<td style="width:770px"><asp:label id="lblViewCart" runat="server" Font-Size="Small" ForeColor="Navy" Font-Bold="True"
							Font-Names="Verdana">
							View Cart Items</asp:label></td>
					<td style="width:10px">&nbsp;</td>
				</tr>
			</table>
			<!-- This table is for the main body and datagrid  -->
			<table cellspacing="0" cellpadding="0" width="800" border="0">
				<tr>
					<td style="width:20px">&nbsp;</td>
					<td style="width:770px">&nbsp;</td>
					<td style="width:10px">&nbsp;</td>
				</tr>
				<tr>
					<td style="width:20px">&nbsp;</td>
					<td style="width:770px">
					
			    	<!-- Standard Map Cart Panel & DataGrid -->
			    	
			    	<asp:Panel ID="StdMapCartPanel" runat="server" Width="770"> 
					<asp:Label ID="lblStdMapHeader" runat="server" Font-Bold="True" Font-Names="Verdana"
                                Font-Size="Small" ForeColor="Red" Text="Standard Map Cart" Width="156px"></asp:Label><p />
                    <asp:Button ID="btnStdMapUpdate" CssClass="cartbutton" runat="server" Visible="true" Text="Update Quantity" />         
                        <p /><asp:datagrid id="StdMapGrid" runat="server" Width="765px" AutoGenerateColumns="False" Visible="false"
								Height="224px" OnDeleteCommand="StdMapGrid_DeleteCommand" OnUpdateCommand="StdMapGrid_UpdateCommand" OnItemCommand="StdMapGrid_ItemCommand" OnItemDataBound="StdMapGrid_ItemDataBound">
								<Columns>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>																											
										<tr><td style="width:120px"><asp:Label ID="lblStdMapProductTitle" CssClass="cartproducttitle" runat="server" Text="Product Title"></asp:Label></td></tr>										
										<tr><td><asp:CheckBox ID="chkStdMapRemove" CssClass="cartcheckbox" runat="server" Visible="true" Text="Remove Item"/></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Map Medium</td></tr>
										<tr><td><asp:DropDownList ID="ddlStdMapMedium"  CssClass="cartdropdownlist" runat="server"></asp:DropDownList>  </td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Map Size</td></tr>
										<tr><td><asp:DropDownList ID="ddlStdMapSize" CssClass="cartdropdownlist" runat="server"></asp:DropDownList></td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Delivery Method</td></tr>
										<tr><td><asp:DropDownList ID="ddlStdMapDeliveryMethod" CssClass="cartdropdownlist" runat="server"></asp:DropDownList></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Qty</td></tr>
										<tr><td><asp:TextBox ID="txtStdMapQuantity" CssClass="cartquantitytextbox" runat="server"></asp:TextBox></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Price</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">Labor</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapLaborCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">Shipping</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapShippingCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Ext. Price</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapExtPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel" >Tax</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapTaxCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenerictotallabel">Total</td>
										<td style="text-align:right"><asp:Label ID="lblStdMapTotalCost" CssClass="cartgenerictotallabel" runat="server">$0.00</asp:Label></td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									</Columns>
								</asp:datagrid>
								<table width="770">
								<tr><td style="text-align:right" class="cartsubtotallabel">SubTotal = 
								<asp:Label ID="lblStdMapSubTotalCost" CssClass="cartsubtotallabel" runat="server">$0.00</asp:Label>
								</td>
								<td style="width:50px">&nbsp;</td>
								</tr>
								</table>
								</asp:Panel> 		
						
						        <!-- Radius Cart Panel & DataGrid -->
						
						        <asp:Panel ID="RadiusCart" runat="server" Width="765">  
								<asp:Label ID="lblRadiusCart" runat="server" Font-Bold="True" Font-Names="Verdana"
                                Font-Size="Small" ForeColor="Red" Text="Radius Map and Labels Cart" Width="253px"></asp:Label><p />
                                <asp:Button ID="btnRadiusUpdate" CssClass="cartbutton" runat="server" Visible="true" Text="Update Quantity" /><br />
                        <p /><asp:datagrid id="RadiusGrid" runat="server" Width="770px" AutoGenerateColumns="False" Visible="false"
								Height="224px" OnDeleteCommand="RadiusGrid_DeleteCommand" OnUpdateCommand="RadiusGrid_UpdateCommand" OnItemCommand="RadiusGrid_ItemCommand" OnItemDataBound="RadiusGrid_ItemDataBound">
								<Columns>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>																														
										<tr><td style="width:120px"><asp:Label ID="lblRadiusProductTitle" CssClass="cartproducttitle" runat="server" Visible="true">Product Title</asp:Label></td></tr>
										<tr><td>
										<asp:CheckBox ID="chkRadiusRemove" CssClass="cartcheckbox" runat="server" Visible="true" Text="Remove Item"/></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">APNs (comma-delimited</td></tr>
										<tr><td><asp:TextBox ID="txtRadiusMapAPNs" CssClass="cartAPNtextbox" runat="server"></asp:TextBox></td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>									
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Map Medium</td></tr>
										<tr><td><asp:DropDownList ID="ddlRadiusMapMedium"  CssClass="cartdropdownlist" runat="server"></asp:DropDownList>  </td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Delivery Method</td></tr>
										<tr><td><asp:DropDownList ID="ddlRadiusMapDeliveryMethod" CssClass="cartdropdownlist" runat="server"></asp:DropDownList></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td><asp:Label ID="lblRadiusMapQuantity" CssClass="cartgenericlabel" runat="server">Map<br />Qty</asp:Label></td></tr>
										<tr><td><asp:TextBox ID="txtRadiusMapQuantity" CssClass="cartquantitytextbox" runat="server"></asp:TextBox></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td><asp:Label ID="lblRadiusLabelQuantity" CssClass="cartgenericlabel" runat="server">Label<br /> Qty</asp:Label></td></tr>
										<tr><td><asp:TextBox ID="txtRadiusLabelQuantity" CssClass="cartquantitytextbox" runat="server"></asp:TextBox></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Price</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">Labor</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusLaborCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">Shipping</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusShippingCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Ext. Price</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusExtPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">Tax</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusTaxCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenerictotallabel">Total</td>
										<td style="text-align:right"><asp:Label ID="lblRadiusTotalCost" CssClass="cartgenerictotallabel" runat="server">$0.00</asp:Label></td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									</Columns>
								</asp:datagrid>
								<table width="770">
								<tr><td style="text-align:right" class="cartsubtotallabel">SubTotal = 
								<asp:Label ID="lblRadiusSubTotalCost" CssClass="cartsubtotallabel" runat="server">$0.00</asp:Label>
								</td>
								<td style="width:50px">&nbsp;</td>
								</tr>
								</table>								
								</asp:Panel> 
								
								<!-- Data Subscription Cart Panel & DataGrid -->
								
								<asp:Panel ID="DataSubCart"  Width="765" runat="server"> 
								<asp:Label ID="lblDataSubHeader" runat="server" Font-Bold="True" Font-Names="Verdana"
                                Font-Size="Small" ForeColor="Red" Text="Data Subscription Cart" Width="192px"></asp:Label><p />
                    <asp:Button ID="btnDataSubUpdate" CssClass="cartbutton" runat="server" Visible="true" Text="Update Quantity" />         
                        <p /><asp:datagrid id="DataSubGrid" runat="server" Width="765px" AutoGenerateColumns="False" Visible="false"
								Height="224px" OnDeleteCommand="DataSubGrid_DeleteCommand" OnUpdateCommand="DataSubGrid_UpdateCommand" OnItemCommand="DataSubGrid_ItemCommand" OnItemDataBound="DataSubGrid_ItemDataBound">
								<Columns>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>																														
										<tr><td style="width:120px">
										<asp:Label ID="lblDataSubProductTitle" CssClass="cartproducttitle" runat="server" Text="Product Title"></asp:Label></td></tr>
										<tr><td>
										<asp:CheckBox ID="chkStdMapRemove" CssClass="cartcheckbox" runat="server" Visible="true" Text="Remove Item"/></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>									
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Delivery Method</td></tr>
										<tr><td><asp:DropDownList ID="ddlDataSubDeliveryMethod" CssClass="cartdropdownlist" runat="server"></asp:DropDownList></td></tr>										
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Qty</td></tr>
										<tr><td><asp:TextBox ID="txtDataSubQuantity" CssClass="cartquantitytextbox" runat="server"></asp:TextBox></td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Price</td>
										<td style="text-align:right"><asp:Label ID="lblDataSubPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel">&nbsp;</td>
										<td style="text-align:right">&nbsp;</td></tr>
										<tr><td class="cartgenericlabel">&nbsp;</td>
										<td style="text-align:right">&nbsp;</td></tr>									
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn>
										<ItemTemplate>
										<table>
										<tr><td class="cartgenericlabel">Ext. Price</td>
										<td style="text-align:right"><asp:Label ID="lblDataSubExtPriceCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenericlabel" >Tax</td>
										<td style="text-align:right"><asp:Label ID="lblDataSubTaxCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										<tr><td class="cartgenerictotallabel">Total</td>
										<td><asp:Label ID="lblDataSubTotalCost" CssClass="cartgenericcostlabel" runat="server">$0.00</asp:Label></td></tr>
										</table>
										</ItemTemplate>
									</asp:TemplateColumn>
									</Columns>
								</asp:datagrid>
								<table width="770">
								<tr><td style="text-align:right" class="cartsubtotallabel"></td>
								<td style="width:50px">&nbsp;</td>
								</tr>
								</table>
								</asp:Panel> 
							<table width="770">
							<tr><td style="text-align:right" class="cartgrandtotallabel">Grand Total = 
							<asp:Label ID="lblCartGrandTotal" CssClass="cartgrandtotallabel" runat="server">$0.00</asp:Label>
							</td>
							<td style="width:50px">&nbsp;</td>
							</tr>
							<tr><td style="text-align:right">&nbsp;</td><td style="width:50px">&nbsp;</td></tr>
							<tr><td style="text-align:right"><asp:Button ID="btnCheckout" runat="server" CssClass="cartcheckoutbutton" Text="CHECKOUT" /></td>
							<td style="width:50px">&nbsp;</td></tr>
							</table>	
																			                      
                    </td>
					<td style="width:10px">&nbsp;</td>
				</tr>
				<tr>
					<td style="width:20px">&nbsp;</td>
					<td style="text-align:right; width:770px"></td>
					<td style="width:10px">&nbsp;</td>
				</tr>
			</table>
			<!-- This include file is for the footer -->
			<!-- #include file="includes/footer.aspx" -->			
    </form>
</body>
</html>
 
 
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
 
public partial class GISCart : System.Web.UI.Page
{
    DataTable stdMapCart = new DataTable();
    DataTable radiusCart = new DataTable();
    DataTable dataSubCart = new DataTable();
 
    DataView stdMapCartView;
    DataView radiusCartView;
    DataView dataSubCartView;
 
    Int32 prodTypeID;
    Int32 catalogID;
    String searchString = " ";
 
 
    protected void Page_Load(object sender, EventArgs e)
    {
        prodTypeID = Convert.ToInt32(Request.QueryString["ProdTypeID"]);
        catalogID = Convert.ToInt32(Request.QueryString["CatalogID"]);
        searchString = Convert.ToString(Request.QueryString["SearchString"]);
 
        Session["ProdTypeID"] = prodTypeID;
        Session["CatalogID"] = catalogID;
        Session["SearchString"] = searchString;
 
        // Retrieve the session carts created in Mapstore.aspx.cs and bind to cart datagrids
        // ItemDataBound event is processed for cart grids
 
        if (!IsPostBack)
            BindDataGridsToSessionCartTables();
    } 
 
   
    protected void BindDataGridsToSessionCartTables()
    {
        Int32 numStdMapItems, numRadiusItems, numDataSubItems;
        Double subTotalStdMap = 0.0, subTotalRadius = 0.0, subTotalDataSub = 0.0;
 
        // Retrieve valid cart tables from session state, calculate each subtotal,
        // then bind to datagrid.
 
        numStdMapItems = (Int32)Session["NumStdMapsItems"];
        numRadiusItems = (Int32)Session["NumRadiusItems"];
        numDataSubItems = (Int32)Session["NumDataSubItems"];
 
        
        if (numStdMapItems > 0)
        {
            stdMapCart = (DataTable)Session["StdMapCart"];
            subTotalStdMap = TotalCartItems(stdMapCart);
            lblStdMapSubTotalCost.Text = subTotalStdMap.ToString("C");
            stdMapCartView = new DataView(stdMapCart);
            stdMapCartView.Sort = "ProductTitle";
            StdMapGrid.DataSource = stdMapCartView;
            StdMapGrid.DataBind();
            StdMapGrid.Visible = true;
            lblStdMapSubTotalCost.Visible = true;            
        }
 
        if (numRadiusItems > 0)
        {
            radiusCart = (DataTable)Session["RadiusCart"];
            subTotalRadius = TotalCartItems(radiusCart);
            lblRadiusSubTotalCost.Text = subTotalRadius.ToString("C");            
            radiusCartView = new DataView(radiusCart);
            radiusCartView.Sort = "ProductTitle";
            RadiusGrid.DataSource = radiusCartView;
            RadiusGrid.DataBind();
            RadiusGrid.Visible = true;
            lblRadiusSubTotalCost.Visible = true;            
        }
 
        if (numDataSubItems > 0)
        {
            dataSubCart = (DataTable)Session["DataSubCart"];
            subTotalDataSub = TotalCartItems(dataSubCart);                 
            dataSubCartView = new DataView(dataSubCart);
            dataSubCartView.Sort = "ProductTitle";
            DataSubGrid.DataSource = dataSubCartView;
            DataSubGrid.DataBind();
            DataSubGrid.Visible = true;
        }
    }    
 
 
    protected Double TotalCartItems(DataTable cart)
    {
        Int32 rowCount;
        Double subTotal, extPrice;
        DataRow datarow;
 
        subTotal = 0.0;
        extPrice = 0.0;
 
        rowCount = cart.Rows.Count;
 
        int indexExtPrice = cart.Columns.IndexOf("ExtPrice");
 
        for (int i = 0; i < rowCount; i++)
        {
            datarow = cart.Rows[i];
            extPrice = Convert.ToDouble(datarow.ItemArray.GetValue(indexExtPrice));
            subTotal += extPrice;
        }
 
        return subTotal;        
        
    }
 
    protected void lbtnReturn_Click(Object sender, EventArgs e)
    {
        if (Session["SearchString"] != null)
            searchString = Session["SearchString"].ToString();
        else
            searchString = "";
 
        Response.Redirect("mapstore.aspx?CatalogID=" + catalogID + "&SearchString=" + searchString, false);
    }
 
 
    protected void StdMapGrid_DeleteCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void StdMapGrid_UpdateCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void StdMapGrid_ItemCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void StdMapGrid_ItemDataBound(Object sender, DataGridItemEventArgs e)
    {
 
    }
 
 
    protected void RadiusGrid_DeleteCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void RadiusGrid_UpdateCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void RadiusGrid_ItemCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void RadiusGrid_ItemDataBound(Object sender, DataGridItemEventArgs e)
    {
 
    }
 
    protected void DataSubGrid_DeleteCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void DataSubGrid_UpdateCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void DataSubGrid_ItemCommand(Object sender, DataGridCommandEventArgs e)
    {
 
    }
 
    protected void DataSubGrid_ItemDataBound(Object sender, DataGridItemEventArgs e)
    {
 
    }
 
    
}

Open in new window

0
Comment
Question by:MicheleDunham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Dustin Hopkins earned 500 total points
ID: 21859057
Thats because they are embedded. so you would have to use findcontrol:
sorry a little rusty on my c#
//this references row 1
    Label lbltext = (Label)DataGrid1.Items(1).FindControl("label1");
    // set text
lbltext.Text = "Set Text";
    //get text
    string strvariable = lbltext.Text;
   
you could also reference the text directly like this

    string strtext = ((Label)DataGrid1.Items(1).FindControl("label1")).Text;
0
 

Author Closing Comment

by:MicheleDunham
ID: 31470299
Thanks for pointing this out.  I've used FIndControl once before with EventArgs; didn't know it was used in this sense too.  Thanks again.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question