user-controls

How do I build a user control into a self-contained assembly in VS2008?

More specifically, what do I need to know about doing this in Visual Studio 2008 that's different from VS2005? I have found a decent number of references for doing this kind of thing in VS2005, such as http://webproject.scottgu.com/CSharp/usercontrols/usercontrols.aspx http://stackoverflow.com/questions/323702/techniques-for-distributi...

ASP.NET User Control <%@ Register .. > directive confusion

After reading the answer here, I understand that, if I register a user control (I guess I'm really trying to use it as a custom server control) like this: <%@ Register Assembly="MyDLL" Namespace="MyDLL" TagPrefix="myDLL" %> Then only the codebehind is used, and the markup (.ascx) page is ignored. Why is this the case (it seems arbitra...

ASP.NET User Controls - Problem adding multiple instances programmatically?

Hi, I have created a user control which basically consists of 3 text boxes. I want to allow the user to click a hyperlink which will add a new instance of the user control onto a PlaceHolder. This seems to be working as I populate one of the text box controls with a random number which changes whenever I click the hyperlink. However, it...

Accessing a UserControls methods from its object.

I have created a UserControl called AutorControl with a method to clear its textbox: public void LimpiarAutorTextbox() { textBox1.Text = ""; } Then my intention is from another form with a Panal, using a for loop add X ammount of the above user control. Then I want to call the UserControls method: "LimpiarA...

How do you render a User control from a ashx or webservice?

Question is it possible to have a .ashx or webservice return a user control rendered? if so how would i do this? ...

What is the best way to create a custom derived grid control?

I want to create a custom grid derived from DevExpress grid control. I just want to add several columns and add custom painting. I will then use this control in 2 different forms. The problem is that if I go straightforward and create a class like this: public class GenerateInvoiceGrid : DevExpress.XtraGrid.GridControl then I will not...

Access to variables in an asp.net user control vs an include file

I've asked this question before but couldn't get the answer I was looking for so I'm going to try it again. I'm translating pages from old asp to asp.net and I don't want to do this any other way so I really just want to know if this can be done. In asp, I'd assign a variable on one page <% myVar = "something" %> I could assign man...

Winform & user control - C#

I have a Form and a UserControl. The UserControl has a menu, and the form has a tabstrip (General, Food, Vitamins etc). In the UserControl, I have the following code: (Form name is frmForm, the tab names in the form are tabGeneral,tabFood, tabVitamins) frmForm fm=new frmForm(); fm.tabMain.Selected=tabVitamins; I call these line f...

Including Javascript and css in Master pages and User Controls in asp.net

I am trying to include the js and css in my code behind in my master pages and user controls in Page_Load event. But apparently, js breaks since Page_Load of user controls loads BEFORE Page_Load of a master page. I include my jquery libs used across the site in my master pages, but scripts used in user control are included in user cont...

Cannot see new asp.net user controls

I am feeling like an idiot right now, but I cannot for the life of me figure out why I cannot seem to call user controls from within my asp.net webpage. I'm still learning asp.net but I can't find any information from searching on google. I'm trying to load a specific control on the page when the user presses a linkbutton. So I create...

Windows Forms application, how to communicate between custom controls?

I have three user controls. Here are the description of them: 1) First user control(ucCountry) contains combobox which displays country names from an xml file. 2) Second user control(ucChannelType) contains two radio buttons one to select TV and other to select Radio Channel Type. 3) Third usercontrol(ucChannels) will populate all the ...

Custom Silverlight button with <Path> content and visual states

I would like to create a button control that has a Path element as its content--an IconButton if you will. This button should fulfill two conditions: 1. The Path element's stroke and fill colors should be available for manipulation by the VisualStateManager. 2. The Path element's data string (which defines it's shape) can be set i...

ASP.Net: User control with content area, it's clearly possible but I need some details.

I have seen two suggestions for my original question about whether it is possible to define a content area inside a user control and there are some helpful suggestions i.e. http://stackoverflow.com/questions/1971498/passing-in-content-to-asp-net-user-control and http://stackoverflow.com/questions/1912283/asp-net-user-control-inner-con...

User control event or method override where custom properties are valid?

I have an ASP.NET user control that is used in another use control. The parent user control uses data-binding to bind to a custom property of the child user control. What method can I override or page event where I am ensured that the property state is set? I think in a page it is PageLoaded versus the Page_Load override? I am looking ...

Defining path to executable for a custom control

I have created a custom control using VB.NET in Visual Studio 2008 that gives extensive mapping and tracking functionality to a search and rescue app. The problem I am having is that in a number of places I need to define the path to the main applications executable in order to find a number of directories the control needs to function ...

web.config file references cannot be found in intellisense

I have referenced multiple user controls within the web.config file, because I was receiving an error in the individual pages and they are used in multiple pages, the code I wrote is as follows: <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, Publ...