|
Hallo, hier nochmal der gesamte Code aller involvierten Seiten unter ASP.NET
2.0 TEST.ASPX (code behind): 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; public partial class MyUserControll :
System.Web.UI.UserControl { public System.Web.UI.WebControls.Label l_persBLZ; protected void Page_Load(object sender, EventArgs
e) { } } TEST.ASPX : <%@
Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %> <%@
Register Src="MyUserControll.ascx" TagName="MyUserControll" TagPrefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.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="Label1"
runat="server" Text="Label"></asp:Label><uc1:MyUserControll ID="MyUserControll1" runat="server"
/> </div> </form> </body> </html> MYUSERCONTROL.ASCX
(code behind): 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; public partial class MyUserControll :
System.Web.UI.UserControl { public System.Web.UI.WebControls.Label l_persBLZ; protected void Page_Load(object sender, EventArgs
e) { } } MYUSERCONTROL.ASCX: <%@
Control Language="C#" AutoEventWireup="true" CodeFile="MyUserControll.ascx.cs" ClassName="MyUserControll" Inherits="MyUserControll" %> Wo liegt nun das Problem !! MfG Hans -----Ursprüngliche Nachricht----- Nein, leider funktioniert auch nicht. Das kann doch gar nicht sein ????? Tagelang sitz ich hier an diesem Problem ? Mit freundlichen Grüßen Hans -----Ursprüngliche Nachricht----- Von: Auftrag von Alexander Zeitler Gesendet: Samstag, 17. September 2005 13:42 Betreff: RE: [Asp.net] UserControls in ASP.NET 2.0 Hallo, >Control c1 = LoadControl(this.TemplateSourceDirectory+"/MyUserControll.ascx"); >((MyUserControll)c1).l_persBLZ.Text="TEST"; versuchs mal so: MyUserControll c1 = (MyUserControll)LoadControl(this.TemplateSourceDirectory+"/MyUserControll.as cx"); MyUserControll)c1.l_persBLZ.Text="TEST"; Gruss Alex _______________________________________________ Asp.net Mailingliste, Postings senden an: An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/asp.net _______________________________________________ Asp.net Mailingliste, Postings senden an: An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/asp.net |
- [Asp.net] UserControls in ASP.NET 2.0 Schwab Johann
- RE: [Asp.net] UserControls in ASP.NET 2.0 Alexander Zeitler
- AW: [Asp.net] UserControls in ASP.NET 2.0 Schwab Johann
- AW: [Asp.net] UserControls in ASP.NET 2.0 Schwab Johann
- AW: [Asp.net] UserControls in ASP.NET 2... Wolfgang Kluge
- AW: [Asp.net] UserControls in ASP.... Schwab Johann
- AW: [Asp.net] UserControls in ... Wolfgang Kluge
- AW: [Asp.net] UserControls in ASP.NET 2.0 Wolfgang Kluge
- AW: [Asp.net] UserControls in ASP.NET 2.0 Schwab Johann
- AW: [Asp.net] UserControls in ASP.NET 2.0 Wolfgang Kluge
