Click here to Skip to main content
16,014,294 members
Home / Discussions / C#
   

C#

 
GeneralRe: .NET standard components Pin
John_Adams5-Mar-08 5:14
John_Adams5-Mar-08 5:14 
GeneralRe: .NET standard components Pin
Pete O'Hanlon5-Mar-08 8:30
mvePete O'Hanlon5-Mar-08 8:30 
GeneralRe: .NET standard components Pin
Steve Declerck5-Mar-08 23:22
Steve Declerck5-Mar-08 23:22 
QuestionThreads and BeginReceive Pin
Echilon5-Mar-08 3:28
Echilon5-Mar-08 3:28 
GeneralRepost ( new member ) Pin
led mike5-Mar-08 4:52
led mike5-Mar-08 4:52 
GeneralWebcontrol inside a webcontrol Pin
ezazazel5-Mar-08 3:26
ezazazel5-Mar-08 3:26 
GeneralRe: Webcontrol inside a webcontrol Pin
Vasudevan Deepak Kumar5-Mar-08 4:34
Vasudevan Deepak Kumar5-Mar-08 4:34 
GeneralRe: Webcontrol inside a webcontrol Pin
ezazazel5-Mar-08 5:01
ezazazel5-Mar-08 5:01 
I think I located the problem. It seems to be here:
WebControl cntrl = new WebControl
(HtmlTextWriterTag.Div);<---
I tried HtmlTextWriterTag.Object /Unknown and many more.. sometimes I get a blank square, but most of the time nothing.

With the debugger taken a closer look, it reveals to me, that the control is correctly added. It is simply not shown (rendered).
WebUserControl1 wuc = new WebUserControl1();
cntrl.Controls.Add(wuc);
return cntrl;

Here the very essential part of the code, where WebUserControl1 holds a Label:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AddCntrlCls cls = new AddCntrlCls();
try
{
this.Controls.Add(cls.AddElement());
}
catch(Exception ex)
{
throw new Exception(ex.ToString());
}
}
}

public class AddCntrlCls
{
public WebControl AddElement()
{
WebControl cntrl = new WebControl(HtmlTextWriterTag.Div);
WebUserControl1 wuc = new WebUserControl1();
cntrl.Controls.Add(wuc);

return cntrl;
}
}

Yes, before I forget - I'm working with a project (WebApplication), therefore I can create instances of Controls, at least to me it ssems so.
GeneralRe: Webcontrol inside a webcontrol Pin
ezazazel5-Mar-08 6:28
ezazazel5-Mar-08 6:28 
GeneralDataGridView & DataSet - Updating the DataBase Pin
half-life5-Mar-08 3:23
half-life5-Mar-08 3:23 
QuestionP/Invoking void * - is this the right way? Pin
Luca Leonardo Scorcia5-Mar-08 2:54
professionalLuca Leonardo Scorcia5-Mar-08 2:54 
AnswerRe: P/Invoking void * - is this the right way? Pin
led mike5-Mar-08 4:56
led mike5-Mar-08 4:56 
AnswerRe: P/Invoking void * - is this the right way? Pin
Luc Pattyn5-Mar-08 5:43
sitebuilderLuc Pattyn5-Mar-08 5:43 
GeneralRe: P/Invoking void * - is this the right way? Pin
Luca Leonardo Scorcia5-Mar-08 7:32
professionalLuca Leonardo Scorcia5-Mar-08 7:32 
AnswerRe: P/Invoking void * - is this the right way? Pin
Ernest Laurentin5-Mar-08 5:59
Ernest Laurentin5-Mar-08 5:59 
GeneralInvalidPrinterException when printer is installed and working - only with HP LaserJet 1010 series Pin
Dragan Matic5-Mar-08 2:22
Dragan Matic5-Mar-08 2:22 
GeneralStarting point to Crystal Reports Pin
Harvey Saayman5-Mar-08 2:16
Harvey Saayman5-Mar-08 2:16 
General[Message Deleted] Pin
Krishnaraj Barvathaya B5-Mar-08 0:52
Krishnaraj Barvathaya B5-Mar-08 0:52 
GeneralRe: How to copy files in a folder tree into a single folder Pin
pmarfleet5-Mar-08 1:26
pmarfleet5-Mar-08 1:26 
GeneralRe: How to copy files in a folder tree into a single folder Pin
Krishnaraj Barvathaya B5-Mar-08 5:48
Krishnaraj Barvathaya B5-Mar-08 5:48 
GeneralRe: How to copy files in a folder tree into a single folder Pin
Anthony Mushrow5-Mar-08 6:03
professionalAnthony Mushrow5-Mar-08 6:03 
GeneralRe: How to copy files in a folder tree into a single folder Pin
pmarfleet5-Mar-08 8:32
pmarfleet5-Mar-08 8:32 
GeneralRe: How to copy files in a folder tree into a single folder Pin
Pete O'Hanlon5-Mar-08 1:32
mvePete O'Hanlon5-Mar-08 1:32 
GeneralUnable to access SQL Reports in C#.Net windows application Pin
Vinay Babu4-Mar-08 23:20
Vinay Babu4-Mar-08 23:20 
GeneralRe: Unable to access SQL Reports in C#.Net windows application Pin
pmarfleet5-Mar-08 1:27
pmarfleet5-Mar-08 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.