Hi Jape,
Given the below markup & code, this may be of help to you:
GridView g = (GridView) myPlaceHolder.FindControl("myDDL");
Site1.master.aspx:
<%@ Master Language="C#" AutoEventWireup="true"
CodeBehind="Site1.master.cs" Inherits="Site1" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="myLabel" />
<asp:ContentPlaceHolder ID="myPlaceHolder" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="LoginApp._Default"
MasterPageFile="~/Site1.Master"%>
<asp:Content ID="myContent" ContentPlaceHolderID="myPlaceHolder"
Runat="Server">
<asp
ropDownList ID="myDDL" runat="server">
<asp:ListItem Value="1" Text="Indeed" />
<asp:ListItem Value="2" Text="Yeah" />
<asp:ListItem Value="3" Text="Exactly" />
</asp
ropDownList>
</asp:Content>
Site1.master.cs:
using System;
using System.Web.UI;
using System.Web.UI.WebControls.
public partial class Site1 : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
GridView g = (GridView) myPlaceHolder.FindControl("myDDL");
}
}
=========
Regards,
Steve
www.stkomp.com