CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 9/9/2003 4:44:48 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 321 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
kleptos
Asp.Net User
Load Web User Control on Page Load9/9/2003 4:44:48 PM

0

I have a web page, with a header and footer web control and it all works great. What i want to do is load a web user control on load of the page. Let me explain a little more.

If i have a links page (links.aspx) with 3 web user controls. header.ascx, footer.ascx, and link.ascx. When i click on a link thats contained in the link.ascx i want to use the same links.aspx (mostly for the header and footer controls) but i want to load another web user control in the same spot where the old link.ascx is.

Is this possible?

Thanks!
.. :: kleptos :: ..
josephbui
Asp.Net User
Re: Load Web User Control on Page Load9/9/2003 5:43:36 PM

0


<%@ Page %>
<%@ Register TagPrefix="x" TagName="Links" Src="Links.ascx" %>
<%@ Register TagPrefix="x" TagName="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="x" TagName="Footer" Src="Footer.ascx" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{
Label label;
switch (Request.QueryString["links"])
{
case "labelcontrol":
Form_Page.Controls.Remove(Links1);
Form_Page.Controls.Insert(1, label = new Label());
label.Text = "The label in place of the Links.ascx";
break;
}
}
</script>
<html><body><form runat="server" id="Form_Page">
<x:Header runat="server" />
<x:Links runat="server" id="Links1" />
<x:Footer runat="server" />
</form></body></html>


Assuming Links.ascx contains something like this:

Show a label control instead of the links
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Content & complexity: information design in technical communication Authors: Michael J. Albers, Beth Mazur, Pages: 368, Published: 2003
Beginning ASP.NET 3.5 in C# 2008: from novice to professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Programming C# Authors: Jesse Liberty, Pages: 689, Published: 2003
Asp.Net Web Developer's Guide Authors: Robert Patton, Mesabah̄a Ah̄amada, Jonothon Ortiz, Wei Meng Lee, Pages: 608, Published: 2002
ASP.NET unleashed Authors: Stephen Walther, Pages: 1459, Published: 2003

Web:
User Control and Page Load Talk about User Control and Page Load. ... Web Form, what happens is, First the Page_Load event of the Web Form gets called ...
Programatically Load User Controls - developer Fusion - ASP.NET ... Load the UserControl; Get the type of UserControl; Get access to the property ... Web.UI.WebControls. Public Class cbDefault : Inherits Page ...
Page Load fired 3 times Web user control is embedded in a custom ... Page Load fired 3 times Web user control is embedded in a custom control ASP.NET Building Controls.
Programmatically Load Web User Control At Runtime Oct 13, 2006 ... How can you programmatically load an ASP.NET 2.0 UserControl at runtime? ... When the web site's default page is loaded, a single button ...
Cannot load UserControl using Page.LoadControl() from web part ... Cannot load UserControl using Page.LoadControl() from web part where control is deployed to _controltemplates directory on non root site collection ...

Dynamically load user control from control library - ng.asp-net ... I have no problem using the web user controls as long as I hard-code them into an .aspx page and use a @Register directive. ...
Load Web User Control on Page Load - ng.asp-net-forum.windows ... Load Web User Control on Page Load, > ROOT > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum, Date: 9/9/2003 4:44:48 PM, Replies: 1, ...
collapsed Treeview on page load? - ng.asp-net-forum ... Load Web User Control on Page Load - ng.asp-net-forum.windows ... collapsed Treeview on page load? - ng.asp-net-forum . ...
ContentPlaceHolder: Loading user control(ascx) file in ... user control page: hello.ascx. Now, I want to add the hello.ascx file in ... If so, why don't you just declaritively load the UserControl into the ... PROFESSIONAL SHAREPOINT 2007 WEB CONTENT MANAGEMENT DEVELOPMENT: ...
Add usercontrol to webpart - ng.asp-net-forum ... Load the control from the file system. myUserControl = Page.LoadControl( UserControlsVirtualPath);. // Get a generic web part from the user ...

Videos:
Web Applications and the Ubiquitous Web Google TechTalks February 1, 2006 Dave Raggett Dave Raggett is currently a W3C Fellow from Canon, and W3C Activity Lead for Multimodal ...
Getting Started with the Google Data PHP Client Library Trevor Johns goes over how to get started with the Google Data PHP Client - from installation to general architecture to brief demo with the ...
How To Break Web Software - A look at security ... Google TechTalks April 13, 2006 Mike Andrews Mike Andrews is a senior consultant who specializes in software security and leads the web ...
Matt Cutts Discusses Snippets Google guru Matt Cutts discusses how best to optimize your site for Google. Matt Cutts joined Google as a software engineer in January 2000. He ...
Developing JavaScript with Chickenfoot Google TechTalks July 25, 2006 Rob Miller Michael Bolin ABSTRACT Chickenfoot is a Firefox extension that embeds a JavaScript programming ...






variables not retaining value

rendering in vs.net 2003

dynamically loading all server controls in a page from assembly

custom inherited controls

windows server 2003 r2 file replication?

web user control - persisting state accross postback

page skinning.

ntp on domain controller located on backnet

custom control using controlbuilder

containercontroldesigner for my 2 table cells

custom composite control and databinding

any other hosts like resellerchoice but running plesk?

server controls generated in dll and not in aspx.

deprecated apis in control designer

securing control/component

help - link button on user control 'losing its mind'

prerender is too late! (event throwing)

user control as a container

event/sub is re-running when the web page is refreshed

registrar questions

per-user odbc?

dynamically create non-fixed number of textboxes in composite control

referencing a custom control that's not in a library

how to find control and render it again

problem with user control position in datagrid template column

help me please

create custom control?

building composite control problem , please help

control array

how to determine how much monthly data transfer has taken place for my site?

   
  Privacy | Contact Us
All Times Are GMT