Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










Adding WebUserControl To Gridview In C#?


I want to add a webusercontol which contains a textbox and a label to the gridview control. I am binding a gridview with a datatable dynamically.

Here is my code:

@ Register Src="CompareBox.ascx" TagName="CompareBox" TagPrefix="objCompareBox" %><br>
<asp:GridView ID="grdfoneBoxContainer" runat="server">
<Columns><br>
<asp:TemplateField HeaderText="User control"> <br>
<ItemTemplate><br>
<objCompareBox:CompareBox ID="CompareBoxCol1" runat="server"/><br>.......

txt & lbl are two properties that are declared in WebUserControl but it's giving object reference error .


View 1 Replies (Posted: Nov 4 10 at 9:58)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: Paging In A GridView WebUserControl?
i am create GridView in WebUserControl and and set the AllowPaging="True"din my page is running but the number of page GridView when chose nuber page 1 or 2 or 3the link java

javascript:__doPostBack('ctl00$MainContent$view2$GridView1','Page$5')
why 'ctl00$MainContent$
I
think
the correct sentences
javascript:__doPostBack('GridView1','Page$5')
Server Error in '/' Application.

The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details:System.Web.HttpException: The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.Source Error:

[Code]....

Stack Trace:

[Code]....

Posted: Jan 24, 2011 09:49 AM

View 7 Replies!   View Related
Reusable WebUserControl?
Could someone give me a small example how i canmake reusableWebUserControl (.ascx) file.Basically i need to make a employee lookuputility where users entersemployee id to get Emplyee information.Once the Emplyee information is available, it is used invarious data entry tasks by the page that includes the control.

Posted: Feb 12, 2010 06:51 PM

View 1 Replies!   View Related
C# - GetType() With WebUserControl Not Working
In the project I have some custom WebUserControls for form elements (they encapsulate some standard validators and other system specific functions). My user controls are "DropDownListField" and "TextBoxField". In the code behind of a page I have this code:

string parameterValue = null;
foreach (object control in myMultiView.Views[myMultiView.ActiveViewIndex].Controls)
{
if (control.GetType() == typeof(DropDownListField))
parameterValue = ((DropDownListField)control).Value;
if (control.GetType() == typeof(TextBoxField))
parameterValue = ((TextBoxField)control).Value;
}

For some reason the "if" statements always return false even when I step through the code and see that "control" is getting assigned my web user control. This code is in another place in the project exactly the same except in the other location the standard .net controls "TextBox" and "DropDownList" are used and in the other location the code works. why this wouldn't work with web user controls?

UPDATE: Hmm so in debugging I found this:

?control.GetType();
BaseType: {Name = "DropDownListField" FullName = "WebUI.UserControls.Fields.DropDownListField"}
?typeof(DropDownListField);
BaseType: {Name = "UserControl" FullName = "System.Web.UI.UserControl"}

So typeof is just recognizing they are user controls not the full type it seems. how I would check for a specific user control type?

Posted: Feb 9 at 18:27

View 2 Replies!   View Related
Display Alert In Webusercontrol?
I tried following two coeds

string popupScript = "alert('Already Exists!!!')";
ScriptManager.RegisterClientScriptBlock(UpdatePanel2, UpdatePanel2.GetType(), "clientScript", popupScript, true);

[code]...

Posted: Apr 16, 2009 01:04 PM

View 14 Replies!   View Related
Web Forms :: Use .jsfile In Webusercontrol?
i have one webusercontrol in this i have 6-textboxes i want to write jscript validation for this.... how can i achive it.

Posted: Sep 25, 2010 07:02 AM

View 2 Replies!   View Related
Load Webusercontrol On Asp.asx Page?
i am trying to load my own webusercontrol but so far i can't figure out how to do it right. i can add standard controls like a textbox but my own control don't show on panel

here is my Code

[Code]....

[Code]....

Posted: Sep 25, 2009 08:34 AM

View 2 Replies!   View Related
Web Forms :: How To Insert Webusercontrol In Table
Can anyone tell me how we can insert webusercontrol in Table?

Posted: Jul 23, 2010 12:08 PM

View 6 Replies!   View Related
Web Forms :: Event Not Fired In WebUserControl?
I have parent page which loads child control which in turn contains DataGrid with template field and button has associated Click() event with it. Problem is that Click() event is not actually called at all. Sample code is below.

UserControl [Code]....
Parent Page
[Code]....

I put debugger into LinkButton1_Click event of user control but it never goes there.

Posted: Feb 11, 2010 04:28 PM

View 4 Replies!   View Related
AJAX :: How To Dynamically Add ScriptManager To A WebUserControl
I had this problem: I created a WebUserControl that used som Ajax stuff - hence it needed a ScriptManager.

The problem was that I couldn't add it to the WebUserControls html code (the .ascx file) since the WebUserControl sometimes was placed into a parent page that already had a ScriptManager, and I couldn't add a ScriptManagerProxy since the parent page sometimes didn't had a ScriptManager.

Alot of people just use a ScriptManager on the MasterPage, but this fails if: one doesn't use a MasterPage or one uses iFrames etc. that uses stand alone aspx pages, like Thickbox might do...

Here's the solution:

in the WebUserControls code behind (.cs file), put this:

protected override void OnInit(EventArgs e)

Posted: Feb 09, 2010 01:12 PM

View 2 Replies!   View Related
AJAX :: How To Add WebUserControl As Triggers In Updatepanel
i was made 'webusercontrol'

and i use this:

event 'msgok' :when btnOk clicked
event ''msgcancel' : when btnCnl clicked
sub 'show' : show this dailog

problem : when i add my 'webusercontrol' to a page,

i can add events(msgok,msgcancel) to page codebehind,

but i cant add this to updatepanel tiggers.

make update panel able to add my 'webusercontrol' events ??

webusercontrol code:

[Code]....

Posted: May 25, 2010 01:50 AM

View 3 Replies!   View Related
C# - Cannot Get The Name Of The Webusercontrol In The Intellisense, Although Have Added Reference?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Reference Control = "CHEADER.ascx" Page="~/Default.aspx" %>
<%@ Reference Control = "CLEFT_NAVIGATION.ascx" %>
<%@ Reference Control = "CCOPYRIGHT.ascx" %>
<%@ Reference Control = "CBOTTOM_NAVIGATION.ascx" %>
<%@ Reference Control = "CPAGE0001.ascx" %>
<%@ Reference Control = "CPAGE0002.ascx" %>
<%@ Reference Control = "CPAGE0003.ascx" %>
[code]...
none of the usercontrols appear thats is if i replace "WebUserControl1" by name CHEADER it says CHEADER? what is that!!asp.net c# vsts2008

Posted: Feb 1 at 8:24

View 2 Replies!   View Related
Access C# Function In Javascript, Both Are In Webusercontrol?
I am trying to create a chat application likeFacebook

My chat windows are in the footer control of the website, and C# code also in footer's CS file, i need to call C# function from footer CS file into javascript included in my footer.aspx file,

i have tried it by ICallbackEventHandler, butWebForm_DoCallback(this,arg,RecieveMessage,"",null,false); simply postback my current page, but i need to postback footer.aspx only and call "public void RaiseCallbackEvent(String eventArgument)".

Posted: Apr 15, 2010 05:55 AM

View 3 Replies!   View Related
Finding And Accessing Elements Of A WebUserControl?
I am creating a WebUserControl in ASP.net and want to be able to access elements of that control later. When I access them though I am trying to access them together. For example, adding a CheckBox and a table to a control and then finding the CheckBox, checking whether it has been ticked and if it has been ticked, get the values from the TextBoxes.

I currently have everything loading on the page from the custom controls, but when iterating through the controls on the page, there doesn't appear to be a control of my WebUserControl type. All of the controls are there on the page, but they exist as seperate ASP.net controls.

Am I thinking about this wrong? Is there a better way to do this?

Posted: Mar 3 10 at 0:20

View 1 Replies!   View Related
Web Forms :: Controlling One WebUserControl From Another On The Same Page?
I have a page page1.aspx that consists of 2 user controls. Lets say wuc1 and wuc2.

wuc1 contains a button. On the click of the button on wuc1, I need to hide (set visibility) wuc2.

I've tried Page.parent.findcontrol but in vain.

Posted: Oct 29, 2009 08:59 AM

View 9 Replies!   View Related
Putting Focus On A Field In A Webusercontrol?
I have a textbox on a webusercontrol thats on a webusercontrol thats on a webusercontrol thats on a page.

I tried using the javascript below but it cant find the control.

<asp:Content ID="Content1" ContentPlaceHolderID="CustomerContentPlaceHolder" Runat="Server">
<SCRIPT language=javascript>
var control =
alert(control)
if( control != null ){control.focus();}
</SCRIPT>

Posted: Mar 29, 2010 06:58 PM

View 6 Replies!   View Related
MVC :: Regular WebForm/WebUserControl And DataBinding?
Beside the MVC Views I added a regular WebForm (derived from ViewPage) and a WebUserControl (derived from ViewUserControl)(ASP.NET3.5SP1) to my MVC 2 (Preview 1) web application.I also added the following to the controller:

public
ActionResult ShowWebForm()
{
return
this.View("WebForm1");
}

Posted: Oct 07, 2009 02:42 PM

View 1 Replies!   View Related
Web Forms :: Page_load Of Webusercontrol Called Twice?
I have a page, which load a tab with usercontrol this usercontrol inturn loads an another usercontrol that has treeview. Issue: On (!Postback) of treeview control page_load, this load is gettting called twice. it is not callign the page_load of page but just the control page_load twice.

Tried: changed autoevenwireup from false to true, true to false (no change) Add/Remove of EnableViewState="true" ViewStateMode="Inherit" doesn't make any difference.

but if i add another usercontrolB and load that instead of this controlA, the ControlA still gets called on page_load once and ControlB also once.

Posted: May 05, 2010 03:51 PM

View 2 Replies!   View Related
Web Forms :: Load WebUserControl Via Token?
I'm trying to make this code work to replace the token with a UserControl (ascx) but I have no clue how to make it work. It seems I can only pass a string to replace the token.

[Code]....

Posted: Oct 26, 2009 11:08 PM

View 4 Replies!   View Related
C# - Asyncfileupload Doesn't Work In Webusercontrol?
I'm having a problem with a Webusercontrol that has an asyncfileupload control. My websusercontrol is being loaded in a placeholder control that's wrapped by an updatepanel.Due to asyncpostback, I have to load and clear the placeholder's controls.

The webusercontrol works flawlessly, except the asyncfileupload, which doesn't want to upload at all. I can assure that the code is without error, because I used to have the webusercontrol running as an *.aspx site. control has to be cleared and reloaded with every asyncpostback ?

Posted: Aug 27 10 at 7:19

View 1 Replies!   View Related
Passing A Value To WebUserControl For Show In A Lable?
i have a WebUserControl that have a lable for show message how can i send a value to the lable from Page to my WebUserControl at runtime.

Posted: Dec 9 10 at 7:20

View 3 Replies!   View Related
How To Apply Stylesheet To Labels In Webusercontrol Page
I am adding style sheets in my project . I have created a style for labels.

I linked it to my web page and used. Now the problem is for the first page load , my style sheet attributes are applying. If i select some option in the page and submit , the styles of labels are changing.

[Code]...

how to apply stylesheet to labels in webusercontrol page.

Posted: May 13 09

View 2 Replies!   View Related
Web Forms :: Get Top And Left Of Image Via Javascript In A Webusercontrol?
I have an asp:image in a webusercontrol. Now I try to move an imagebutton onto it. Therefore I need the starting position (left,top of image) for the imagebutton movement. I dragged the Webusercontrol into a table on an aspx page and tried:

image.style.top + left (both return empty string)
image.offsetTop + image.offsetLeft (both return 0)
image.clientTop + image.clientLeft (both return 1)

Encapsulating it in a div or table also wasn't successful. I can not get the relative left and top of the image. All references that are returned seem to point relative to the webusercontrol though in html it is not really rendered as tag..

Posted: Dec 01, 2009 11:59 AM

View 2 Replies!   View Related
Register WebUserControl's On The Web.config File For Sub-app Folder
I seem to be having a problem with my visual studio 2005/2008 installation or something because it isn't providing any IntelliSense whatsoever for controls registered on web.config files in folders different from the root, but it isn't showing any errors neither. Is this behavior normal?

I have access only to the folder of my sub-app, so I can't modify the root's web.config file. Well I COULD, but I'm NOT allowed to.

What I'm trying is to register some WebUserControl's on the web.config file for sub-app folder, so all the pages in my sub-app can use the WebUserControl's without having to register them on every page, but I'm not getting IntelliSense for those controls registered on the web.config file on my sub-app folder, but I do get IntelliSense if I register them on the root's web.config file. IntelliSense for everything else appears to be working fine.

In the web.config file on my sub-app folder I have something like the following:

[code]....

am I doing something wrong?

Update Now I have upgraded to VS2008 SP1 and the issue persist

Posted: Jan 5 10 at 20:29

View 1 Replies!   View Related
Custom Server Controls :: Retaining Value In Webusercontrol
I need to make a dropdownlist webusercontrol that shows a list of years. The control needs to be flexible enough so that I can tell it show X number of years before and after this year. So if I said show 2 years before after this year the dropdownlist would show 2008, 2009, 2010, 2011 & 2012. In the past I've stored the "X years" for later use by exposing a property and then storing the value in a hidden field. EG:

[Code]....

I want to store the"X years" values that I send to the control the first time - so not a value that I send in a postback. Is there a better way than using a hidden field?

Posted: Apr 20, 2010 12:13 PM

View 2 Replies!   View Related
Calling Jquery Ajax Method From WebUserControl?
I am using asp.net3.5 C# with Jquery

I have created a webUserControl timer.ascx, I have a page showTime.aspx I have added timer.ascx into ShowTime.aspx on drodown change I want to display the current time.

but I am getting this error

This type of page is not served. Description: The type of page you have requested is not served because it has been explicitly forbidden.

[Code]....

Posted: Mar 20 at 20:15

View 1 Replies!   View Related
AJAX :: MultiSliderExtender As WebUserControl Causes Javascript Errors?
I started to use theMultiSliderExtender and wanted to create a WebUserControl with it But every timeI add more then one slider I'm getting Javavascript erros

Heres the Code of ASP page:

[Code]....

Heres the Code ofthe WebUserControl:

[Code]....

When the page Opens a JS Error occours in some ASP generated JS Code

[Code]....

d contains the ID TextBox2 but somehowthe TextBox2 object doesent exists on executing this line resulting in null referenc error. If i put All the Code of my WebUserControl into the ASP Page it works fine

If i remove <MultiHandleSliderTargets> ... </MultiHandleSliderTargets> from the Control no error occours. But i need two Sliders

Adding sliders in Page_Load ended with other Execpetions (AjaxControlToolkit.MultiHandleSliderTarget is not serializable).

So my question is: How to make a this WebUserControl working.

I'm using VS Web Dev Express 08, .Net 3.5, ASP Ajax Kit ver 3.0.30930.0 all on Windows 7

Posted: Feb 17, 2010 04:18 PM

View 2 Replies!   View Related
C# - Access WebUserControl DropDown Selected Value Want To Use On 5 Pages?
I have a dropdown inside a webusercontrol which I want to use on 5 pages. I want to save the selected value of the dropdown from the page. I tried to access it using below method, but its not working[URL]

Posted: Sep 5 10 at 2:43

View 1 Replies!   View Related
GetFileName From WebUserControl(ascx) Inside WebForm
how to getthefile namefrom a WebUserControl(ascx) insidein WebForm(aspx) ?

UsingVirtualPathUtility.GetFileName(Request.PhysicalPath)or
System.IO.Path.GetFileName(Request.PhysicalPath) i always retrive the
aspx file name.

Posted: Feb 25, 2010 02:32 AM

View 3 Replies!   View Related
CSS Getting Distorted While Using The Custom WebUserControl In An ASPx Page?
I have a very simple Web UserControl derived from System.Web.UI.UserControl. At Design Time the user control looks perfect in the VS2008 Pane with all CSS styles. When I drag n drop this control on an aspx page, the CSS style gets applied but some texts get hidden and the CSS looks distorted.

I have checked the path of the CSS, UserControl and the ASPx page. All are in the same level under root. The aspx page just contains the UserControl in a FORM tag.

Posted: Oct 6 10 at 5:14

View 1 Replies!   View Related
Web Forms :: Assign Value To Webusercontrol In Registered Page?
I have a webusercontrol with a asp.net flash player. I need to be able to find the control and assign the movieurl from codebehind in the new registered page. How can I find the controlthat is inside a webusercontrol and isregistered in new form and assign the value?

for example: I have webusercontrol called "PopVideo.ascx"registered in the page "Page1.aspx" how can I find the control of the webusercontrol from codebehind under "Page1.aspx"

Posted: Feb 18, 2011 06:55 PM

View 3 Replies!   View Related
AJAX :: Asyncfileupload Doesn't Work In Webusercontrol?
I'm having a problem with a Webusercontrol that has an asyncfileupload control. My websusercontrol is being loaded in a placeholder control that's wrapped by an updatepanel.Due to asyncpostback, I have to load and clear the placeholder's controls.

The webusercontrol works flawlessly, except the asyncfileupload, which doesn't want to upload at all. I can assure that the code is without error, because I used to have the webusercontrol running as an *.aspx site.

I guess that the problem is the fact that the control has to be cleared and reloaded with every asyncpostback ?

Posted: Aug 28, 2010 05:35 PM

View 3 Replies!   View Related
Web Forms :: Assign Value In Codebehind To A Control Inside A Webusercontrol?
I have a webusercontrol with a flash control. I want to assign the movieurl from codebehind when the webusercontrol is registered in a new page.

<uc1:PopVideo
ID="PopVideo1"
runat="server"
/>

inside this webusercontrol I have a flash movie player that I can assign the movieurl in codebehind on the webusercontrol. The problem is that I need to assign the value from the new page the control is registered under. How can I access the flash control from the new page and assign the value?

Posted: Feb 18, 2011 06:48 PM

View 2 Replies!   View Related
VS 2010 Button On WebUserControl Click Events Not Firing?
I have a WebUserControl with a Button and some other controls (placeholder for images, labels). On a certain page, a number of these WebUserControls are created (using Me.LoadControl) and added to a PlaceHolder on the page.When the user clicks the button on either of these usercontrols, I want a method on the page to be called. I have been doing this by handling the Button Click event on the usercontrol, and then letting the usercontrol raise another event. I use AddHandler after creating the usercontrol to add an eventhandler method to this custom event. Sounds confusing? Here's a simple example.

The WebUserControl:
asp Code:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="TestControl.ascx.vb" Inherits="CSLimitedEdition.Controls.TestControl" %><asp:Button runat="server" ID="btn" Text="Button" />
vb.net Code:
Namespace Controls Public Class TestControl Inherits System.Web.UI.UserControl Public Event ButtonClicked As EventHandler ' Just some property to test with Public Property Number As Integer Protected Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn.Click ' When the button is clicked, raise a ButtonClicked event to handle on the Page RaiseEvent ButtonClicked(Me, e) End Sub End ClassEnd Namespace
The Page to place a number of these controls on:
asp Code:
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="TestPage.aspx.vb" Inherits="CSLimitedEdition.Pages.TestPage" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <p> <asp:Label runat="server" ID="lbl" /> </p> <p> <asp:PlaceHolder runat="server" ID="placeHolder" /> </p></asp:Content>
vb.net Code:
Imports CSLimitedEdition.ControlsNamespace Pages Public Class TestPage Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Me.IsPostBack Then Me.AddControls() End If End Sub Private Sub AddControls() For i As Integer = 1 To 5 ' Create the control Dim c As TestControl = DirectCast(Me.LoadControl("~/Controls/TestControl.ascx"), TestControl) ' Set some property for testing and add event handler c.Number = i AddHandler c.ButtonClicked, AddressOf TestControl_ButtonClicked ' Add it to the place holder placeHolder.Controls.Add(c) Next End Sub Private Sub TestControl_ButtonClicked(ByVal sender As Object, ByVal e As EventArgs) ' When a button on a usercontrol is clicked, set the label text to the 'Number' property of that control Dim c As TestControl = DirectCast(sender, TestControl) lbl.Text = c.Number.ToString() End Sub End ClassEnd Namespace

The idea is this:Button is clicked on the TestControl: TestControl.ButtonClicked event is raised. On the TestPage, the bestControl_ButtonClicked method is called The Number property of the calling TestControl is assigned to a label so I can see it. However, it seems that the TestControl_ButtonClicked method is never called. Via debugging I can confirm that the Button Click event, on the TestControl usercontrol, is fired, so that the TestControl.btn_Click method is called. The TestControl.ButtonClicked event is raised.After creating a TestControl, the AddHandler statement is executed. After clicking a button on the page however, nothing happens. The page just posts back, all the buttons are gone (ok, I'm not loading them again in case of a postback), but the label does not get the text.In fact, the ButtonClick handler method (TestPage.TestControl_ButtonClicked) method is never called! What could be causing this? I am sure that I have been using this method a few weeks ago, in this very project, yet suddenly it has stopped working. I thought it might be a one-time thing but with these new TestControl and TestPage the same thing happens. The same thing happens also in a completely new and separate project. I don't get it, this WAS working?

Posted: Dec 24th, 2010, 09:56 AM

View 3 Replies!   View Related
C# - Accessing Control On Page A.ASPX From A WEBUSERCONTROL.ASCX?
How can I access a control on page a.aspx from a webusercontrol.ascx

I do not know the technical term used to describe this, if any,the webusercontrol.ascx page contains a button.

onclick of the button, placeholder on main page must display the "required content".

if this were on the same page no problem.

but how to access across pages?

Posted: Feb 2 at 17:31

View 1 Replies!   View Related
How To Create WebUserControl That Works In DetailsView And Is Bound To SQL-Svr XML-field
I just can't figure out how to approach this, but thisis what I want, would be I havea database-table containing an XML-field. Using LinqToSql I succesfully bound this table to a GridView and a DetailsView control.ow I wrote a WebUserControl that renders a bunch of textboxes,and has a method 'Serialize' that returns theXElement-objectthat I can use in my codebehind to assign it to the LinqToSql-property to save it to database. It also has a public property 'Xml' (type string) that I can use to Bind() the xml-string from the database to it, so the WebUserControl can prefill it's textboxes.

Posted: Dec 07, 2010 08:32 AM

View 1 Replies!   View Related
Forms Data Controls :: WebUserControl - Add DataSource Property
I am creating a WebUserControl in ASP.Net 2.0 C#. I want to add a DataSource property that will have that usefulDropDownList of data sources when I add the control at design time.Here's a fragment of the property in the WebUsercontrol:

[Code]....

Is there an attribute for that?

Posted: Jan 08, 2010 05:12 PM

View 1 Replies!   View Related
Web Forms :: Changing WebUserControl In Parent's PlaceHolder Through Bubbling?
I don't have any code to give since I'm not currently at the office but it's driving me insane so I'm posting in hopes of a solution--I'll explain this to the best of my ability.

I have a page which has a PlaceHolder. This page loads a WebUserControl inside it and if a link is clicked in that WebUserControl, it sends my custom event back to the parent (a bubbled event). This in turn will change the PlaceHolder's control to a new one.

At least that's the theory. The problem is, while the event fires/bubbles and the PlaceHolder DOES get it's control added in debugging it's control tree, it's happening too late in the parent's page life cycle. The parent has already finished loading before
the click event fires to trigger the event in the said parent. I can get this to work fine if I fire the event directly from the parent page; however, that's not what I need. I need the WebUserControl to fire an event to tell the parent to change to the control
(again, this part is already done, it's just firing too late in the page life cycle). A subsequent PostBack to the server then shows the new control (since it was added to the PlaceHolder).

So this begs the question, how do I get the PlaceHolder to load this new control? I read another thread(can't find the link now) and it said one way to solve it was to load the content in the child page. I didn't fully understand that and couldn't get it to
work correctly. I tried having the child page clear the PlaceHolder and add itself on it's load event, but again, I think it's just too late in the parent's page cycle.

Posted: Sep 04, 2009 01:53 AM

View 2 Replies!   View Related
Forms Data Controls :: Execute A Private Sub From Outside The Webusercontrol?
I have a Private Sub which populates a datasource and bind it to a gridview. The Private Sub is named LoadData() and before I just had to type LoadDate() to re-bind the gridview with new data. But now I have moved the gridview to a webusercontrol and I can no longer use LoadData(). Can I fire this Private Sub LoadData() from outside the webusercontrol?

Posted: Nov 04, 2009 12:51 PM

View 2 Replies!   View Related
AJAX :: Masterpage And WebUserControl Page ScripManager In Both Pages?
I have an MasterPage with

<asp:ScriptManager id="s" runat="server" />
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>

Now I want to place an AutoCompleateExtender in an WebUserControl Page

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:TextBox ID="TextBoxSearchClub" Font-Size="Small" runat="server"> [code]....

But i get an error that the page only can include one ScripManager

Posted: Jul 22, 2010 10:12 AM

View 4 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved