Looks like there is no Load event for usercontrol on the CF.
I'm used to loading data on the Load EventHandler.
What is the other alternative to achieve this for CF?
So far looks like I have no choice but to do so in the Contructor of the usercontrol...
...
I've noticed that on most, if not all, standard web controls in the System.Web.UI.WebControls namespace, you can add any properties you want to them without crashing the page.
Take the asp:Button control for an example.
This code is perfectly valid:
<form runat="server">
<asp:Button runat="server" Text="Test button" crapAttribute=...
I added user control to a PlaceHolder with an ID phCustomFields. When I want to remove the user control in phCustomFields, i call phCustomFields.Controls.Clear(). However, after doing this, my usercontrol's Page_Load method still gets hit (i verified this by putting a breakpoint in the user control.) Why is my user control's page_load me...
I'm writing an ASP.NET app in which a table of objects is created by the user client-side.
I envisage them clicking "Add item" and a new 'row' is created in the table with textboxes for them to enter their stuff.
I can do this fine by adding HTML with jQuery. The problem is that one of the fields in the row for the user to fill in needs...
When programmatically adding user controls using LoadControl(string path), when, in the user control's page life cycle, does it initialize its sub-controls with its viewstate?
I'm asking this question because one of my user controls that's being programmatically loaded has a TextBox control that is not being initialized/loaded by it's ...
I am building a custom asp:menu control in ASP.NET using C# code behind. It is based on the sitemap to my website. Here's the basics of the menu:
<%@ Control language="C#" autoeventwireup="true" codefile="Control.ascs.cs" inherits="menuClass" %>
<asp:menu id="myMenu" datasourceid="sitemap" runat="server">
<staticmenuitemstyle font-u...
I currently have a net assembly within an aspx page by using the following tag. The page is only ever accessed using Internet Explorer.
<object id="myControl1" classid="mydll.dll#my.namespace"></object>
This same assembly is also present client side in the windows assembly to allow it to execute code client side when the user does cer...
we have a UserControl to handle User cancellations, that is used in a few places. This has a couple of input fields and a submission button. When they submit the User's status is updated and a few other things are done and a feedback message displayed.
On one of the pages which includes the control, after the User has successfully cance...
I was wondering if it was possible to load a asp.net control (.ascx) that doesn't reside on the file system?
Like say a string variable?
...
Hi,
I'm wondering what the best way is to store user settings? For a web 2.0 app I want users to be able to select certain settings. At the moment is it only when to receive email notifications.
The easiest way would be to just create a Model "Settings" and have a column for every setting and then have a 1-1 relationship with users.
B...
I have a WebPart custom control (Composite) in .Net, which gets created on page load to show a Chart using 'Dundas Charting Controls' (this is created by a user control inside the page). I get the properties for this control from the database.
I have another control, which is a Filter (outside webpart) and based on data of this filter ...
I need to create a dashboard with re-arrangeable/re-positionable dashboard elements (similar to iGoogle) using Silverlight. The dashboard elements are typically tables of data. The user should be able to dynamically add and remove dashboard elements. The user should also be able to use drag and drop to reposition the dashboard elements. ...
Sorry if this is a basic question - I'm having some trouble making the mental transition to ASP.NET MVC from the page framework.
In the page framework, I often use ASCX files to create small, encapsulated chunks of functionality which get inclded in various places throughout a site. If I'm building a page and I need one of these contro...
I have a simple class Product and a UserControl named ProductSummaryControl. ProductSummaryControl displays the details for a Product class that is passed in to its DataContext. I have verified that this works when I set up the control and its property manually.
I run into a problem when I try to use the ProductSummaryControl as part ...
Hey,
This is my aspx code
<body >
<form id="_form1" runat="server" >
<div style=" width:100%; text-align:center;">
<div style="width:80%; margin:0 auto;" >
<asp:ContentPlaceHolder ID="_head" runat="server"></asp:ContentPlaceHolder>
</div>
</div>
...
Hi All,
im basically creating a portal system, and want to load UserControls Dynamically, now i have read a couple of articles on this where they loading them into a placeholder, i have tried this. but it just seems a little buggy. its there not a better way to manage the viewstate etc
how does dotnetnuke do it where they inject the c...
I have a Web Form page that is called Search.aspx. I need to render the form in other places so I'd like to convert the Web Form to a User Control, but my Search.aspx.cs inherits a custom Page class which inherits System.Web.UI.Page. Since I C# doesn't support multiple inheritance, I'm unable to inherit both my custom Page class and Sy...
Recently, I had a user control I was developing throw an exception. I know what caused the exception, but this issue got me thinking. If I have a user control throw an exception for whatever reason and I wish to replace that usercontrol with something else (e.g. an error saying, "Sorry, this part of the page broke.") and perhaps log th...
I have a few (1-3) user controls on my form. I want to be able to click a button on my form (that is not part of the user controls) and have all 3 of my user controls respond. How can I do this?
...
Hi All,
At work we have a pretty large web application that works by having a few pages, with lots of user controls which are nested in these pages. This is working fine most of the time but we have a problem at the moment where one of the user controls isnt working. Originally it was referenced from another project in the solution but ...