Web User Control

Web User Control

Post by ashwini.. » Tue, 27 May 2008 18:32:22



how can call  .ascx file object to other .aspx file
 
 
 

1. web user control within a web user control

Have web user control that contains four buttons and one a user clicks
a button another web user control is posted to the placeholder.  My
question is after the user enters some data into the textbox and
clicks submit, the child web user control goes away( which i
understand as page_load being called for parent web user control ) and
my database code never gets executed.  I load the child web user
controls dynamically, which is rendered from the use selecting a
particular button.  I have seen several responses to this, but nothing
that as provided answer.  I do understand that the child web user
control is no longer load.

Code:

private void Page_Load(object sender, System.EventArgs e)
{
if( Page.IsPostBack )
{
AddNewProject.Enabled = true;
AddNewComponent.Enabled = true;
DeleteComponent.Enabled = true;
RegisterUsers.Enabled = true;

private void DisplayControl( )
{
try
{
this.plcContent.Controls.Add( Page.LoadControl( "~/Administrators/" +
PageName + ".ascx" ) );
this.ShowSelection( PageName );
catch( Exception )
{
this.plcContent.Controls.Add( new System.Web.UI.LiteralControl(
"Invalid Selection!" ) );

private void ShowSelection( string sPage )
{
Button l_Button = (Button)this.FindControl( sPage );
l_Button.Enabled = false;

private void DeleteComponent_Click(object sender, System.EventArgs e)
{
PageName = "DeleteComponent";
DisplayControl( );

private void AddNewComponent_Click(object sender, System.EventArgs e)
{
PageName = "AddNewComponent";        
DisplayControl( );

private void AddNewProject_Click(object sender, System.EventArgs e)
{
PageName = "AddNewProject";
DisplayControl( );

private void RegisterUsers_Click(object sender, System.EventArgs e)
{
PageName = "RegisterUsers";          
DisplayControl( );

2. balloons

3. Problems adding a Web User Control to a Web Custom Control at run time

4. Internet in my network

5. Web User Controls, Web Custom Controls and events

6. Advanced Machine Controls

7. Convert a Web User Control to a Web Custom Control

8. geometric conditions?

9. How to Dynamically create Web User Controls and Web Custom Control?

10. Web user control content doesn't resize in web form table

11. Reusing Web User Controls in different web applications

12. wiring up events for constituent HTML controls in a Web User Control

13. frameset control on web user control