usercontrols

Asp.NET dropdownlist in usercontrol not firing SelectedIndexChanged event

Asp.Net 2.0 framewrok - VB.Net application I have a UserControl containing a Asp.Net DropDownList. Things already researched and \ or tried: The control gets bound to data on page load inside if not Page.IsPostBack (only loads once) ID proprety is set for control (ID = ddlMyControl) AutoPostBack is set to true EnableViewState on the ...

Using a TemplateField inside a web user control

Is it possible to use a TemplateField (or any *Field from a GridView) inside a user control (ascx). I have a complex TemplateField (item, edit, footer) that I would like to easily reuse. Thanks. ...

How can I detect if the design-time value of a web control property has been changed at runtime?

I'm creating a basic asp.net webcontrol that will have a property that can be set at design-time in the HTML and changed at runtime in the code. I'd like to only have the value of the property saved in ViewState if it is set at runtime and is different than the original value that was set at design-time. If the value is never changed at ...

Change border properties of ASCX from code-behind?

Hi I am building a library of asp.net user controls which I am deriving from a custom UserControlBase class which further derives from actual UserControl class. Hierarchy looks like this : ASCX -> UserControlBase : UserControl I have this requirement to put a border around all the ASCX's. So, I thought if I can modify UserControlBase ...

ASP.NET event lifecycle for inherited user controls

Please forgive the psuedo-code, but it's a simple question: I create a user control (myControlBase : UserControl) with a textbox (id = "txtbox") in it's markup. In it's codebehind I write a method SayHello(string s){ txtbox.Text = s; }. I create another user control that extends myControlBase (myControl : myControlBase). In page_lo...

How to fix nested winform control flicker issues.

I am currently working on a program that uses a fairly complex structure of nested winform controls which changes dynamically as a user makes certain selections. To go into more detail about the specific layout of the controls would be to extensive for this question. When ever a selection is made, a lot of updates are made to the underl...

Using webform user control on webform in MVC Project

I am using a server control on a single web.forms page. I have to use this control on a web.forms page since its a server control, although this is actually a MVC project. So I created a web.forms folder and put my new page in it. I then copy the example code from the signature control. I get the following error: The base class includes...

asp.net UserControl inheritance, web controls in base user control are null pointer

hi, i have a base user control (WC1) which inherits from WebUserControl and a child user control (WC2) which inherits from WC1. I added a textBox and a label to WC1 in vs design view not code behind. But all the server controls that i put in WC1 are null and give null pointer exception.I tried to access textBox and label in different eve...

ASP.NET MVC Refresh usercontrols

ASP.NET MVC I have one page Index.aspx where I'm loading two usercontrols into divs. This is working fine. For the moment the usercontrols just shows data and thats working fine. But now I want to add a delete function in the usercontrols and then refresh the div in the Index.aspx page. Is this possible? Index.aspx <!-- Panel One -->...

Is it possible to integrate picturebox and labels inside a Listview? as a User control?

I want to create a listview type user control which'll have a picturebox and a label inside each item. Is that possible? ...

(nested) user controls within a mvp pattern causing sporadic problems

hi everyone, I have a serious problem with nested user controls (UCs) in WinForms while trying to implement the mvp pattern (passive view). The project consists of one model (designed as a singleton) and a set of different presenters with corresponding view interfaces. To avoid one huge view interface and therefore an overloaded main UI,...

ASP.NET User Controls that communicate directly with Service Layer?

Is it considered poor design to create "black box" User Controls that communicate directly with the service layer (to perform CRUD operations, validation, etc)? By "black box", I mean that they retrieve/persist data independently of the page they are hosted on (using IoC injected services). Each UC can be dropped onto a page and it w...

ASP.NET Client Id's not being generated for loaded control

I have a UserControl ('AddressInfoGroup') within an updatepanel that dynamically loads user controls ('AddressInfo') via the loadControl method. I have two other such controls on the same page, both of which function correctly. When the AddressInfoGroup control renders an AddressInfo control to the page, the text boxes in AddressInfo h...

ASP.NET: CollapsiblePanelExtender doesn't work with UserControl

Iam trying to use a UserControl named CheckBoxControl as value for the ExpandControlID/CollapseControlID attributes of the CollapsiblePanelExtender. It works fine when I use a normal CheckBox instead. <uc:CheckBoxControl ID="ucHaftpflicht" runat="server" OnCheckedChanged="UpdateStatus" ControlLabel="Haftpflicht" /> <asp:Panel...

.Net WinForm application not persisting a property of type List<MyClass>

I've created a user control in a Windows Application C# 3.5 and it has a number of properties (string, int, color etc). These can be modified in the properties window and the values are persisted without problem. However I've created a property like public class MyItem { public string Text { get; set; } public string ...

develop own usercontrol at run time of current project c#

hi am confusing that can we have develop our own user control at the run time of our current project suppose I have develop projects Invoice and require user contorl like textboxes and list box as per my requirement then how can i develop the same and utilise it in my current projects invoice is it possible?. if it is then kindly provi...

I'm building an online snippet management website, is there a control that I can use to visualize code and color code source according language?

You guys know in Pastebin how according to the selected language, the code is colored? Is there a control I can use on my site? I'm using PHP and Zend Framework. Edit: I was thinking something along the lines of: CodeControl mycontrol = new CodeControl(sourcecode.txt, 'c#'); or CodeControl mycontrol = new CodeControl(sourcecode.txt...

Finding a control in .net

In vb.net I have control named checkbox1 that I can see at dropdown menu in properties tab. but in designer I am not able to locate it... Also when I am selecting CheckBox1 from properties' dropdown menu, no checkbox in designer gets highlighted.... How to find that control in designer? pls help me.... ...

Silverlight Transparency

Question: Can a constituent UserControl be transparent in parts for it's external container? Details: I have a dialog that I'd like to pull into a separate UserControl. The control contains a Border with a background that has an alpha transparency with a Grid inside it that has a white background and all the content. In xaml markup, i...

Correctly disposing user controls and child controls in C#

Hi we are experiencing a few problems with the IDisposable pattern. In this case there is a user control 'ControlA' with a FlowLayoutPanel, which contains more usercontrols 'ControlB'. When calling Dispose(bool), I check if disposing if true, and if IsDisposed is false. I then try to explicitly dispose each ControlB in the FlowLayoutPa...