Dynamic LoginView and AnonymousTemplate?
- From: bradwiseathome@xxxxxxxxxxx
- Date: 27 Jun 2006 13:33:26 -0700
I would like to dynamically add a LoginView and an AnonymousTemplate to
my ASP.NET 2.0 page. I can't use the page template at all, just the
code-behind page. I tried to create my own class that implements
ITemplate, and then set that as the AnonymousTemplate for the
LoginView. The class is below, it's not working. Help!
using System;
using System.Data;
using System.Configuration;
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;
namespace test
{
public class AnonTest : TemplateControl , ITemplate , ILocalized
{
private LiteralControl _literalControl;
void ITemplate.InstantiateIn( Control parentContainer )
{
this._literalControl = new LiteralControl();
this._literalControl.DataBinding += new EventHandler(
_literalControl_DataBinding );
parentContainer.Controls.Add( this._literalControl );
}
void _literalControl_DataBinding( object sender , EventArgs e )
{
LiteralControl literalControl = sender as LiteralControl;
literalControl.Text = "future database driven".
}
}
}
.
- Prev by Date: Re: Could not establish trust relationship with remote server
- Next by Date: RE: Mixing Forms and Windows Securiey
- Previous by thread: Re: Could not establish trust relationship with remote server
- Next by thread: Re: GetCompiledPageInstance and Medium trust application level
- Index(es):