usercontrols

Subclassing DropDownList in ASP.NET

Hi, I want to subclass the built-in DropDownList in ASP.NET so that I can add functionality to it and use it in my pages. I tried doing this with a UserControl but found that it doesn't expose the internal DropDownList (logically, I guess). I've googled for the answer but can't find anything. I've come as far as writing the actual clas...

Rich Diagram Controls in WinForms

I just started using ANTS 4 .NET profiler and I am looking for something similar to their Call Graph to implement in our own WinForms application(s). In essence, we are looking for a rich (animated) control that we could use to display the relationship between objects in our application - such as the hierarchal relationships between cust...

Preferred method for linking to stylesheets from a UserControl?

We primarily use an ASP.NET environment at work. Right now I'm building an application which uses "Modules", which is just a UserControl, with its' Javascript right in the control, and a link element to the stylesheet for that control. I want to keep it modular, and would like the style of this control to be independent from the markup/j...

Asp.net Usercontrol LoadControl Issue

Hi I am having an issue when using LoadControl( type, Params ). Let me explain... I have a super simple user control (ascx) <%@ Control Language="C#" AutoEventWireup="True" Inherits="ErrorDisplay" Codebehind="ErrorDisplay.ascx.cs" EnableViewState="false" %> <asp:Label runat="server" ID="lblTitle" /> <asp:Label runat="server" ID="lblD...

Implementing an editable DropDownList in ASP.NET

What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components. As a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping a HTML Select with some JavaScript to fill values from the Select to ...

ASP.NET AJAX Page Methods from UserControl

I would like to utilize the ASP.NET AJAX Page Methods functionality with a user control. Is there a way to be able to specify my static [WebMethod] inside the UserControl's code behind instead of the Page's code behind? ...

Equivalent to webcontrols in other frameworks?

What is the equivalent to web controls in frameworks other than ASP.Net? Specifically I'd like to know about Java, PHP and Ruby on Rails. What are the relative merits/faults of each of these frameworks for web development? I've had some exposure to ASP.Net and have been asked to look into developing an app that will have configurable ...

How do I use an asp.net user control in another user control?

I have a user control (gallery.ascx) and I want to use the photo.ascx control in the gallery control. I've added this register at the top of gallery.ascx, but it still can't find photo: <%@ Register TagPrefix="ssctrl" TagName="photo" Src="controls/photo.ascx" %> Any ideas? ...

Checking for Shift+Click or Ctrl+Click in a Web User Control

I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink. Is this possible? Basically, if the logged in user is an Admin then I need to allow them ...

Validating an ASP.NET user control from its parent page

I have an asp.net page with a button. This button generates and inserts a user control into the page, so many controls could exist on one page. I need to validate that a certain dynamically generated control inside the generated control exists. So..Page has 0 to N Control1’s. Each Control 1 can have 0 to N Control2’s. When SaveButt...

Message Box in Python

Is there a UI library to create a message box or input box in python? ...

Whats the best way to update an ASPX page when its child ASCX controls need to trigger a change?

When I have a child .ASCX control that needs to affect something in the parent page I'm not completely sure how I am supposed to handle the event flow in the case where I need to update something in the parent page. What I've always ended up doing is putting logic into the 'Pre_Render' event handler. Since this is processed after any c...

load a user control programmatically in to a html text writer

I am trying to render a user control into a string. The application is set up to enable user to use tokens and user controls are rendered where the tokens are found. StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter writer = new HtmlTextWriter(sw); Control uc = LoadControl("~/includes/Homep...

Is it better to use Nested Master pages or User Controls for multi-sectioned website?

I am creating a website that has 5 different sub-sites each with the same overall look, but each has a different logo and added navigation. What do you feel is a better approach: Use the new nested master page capabilities to create 5 sub-master pages. Use a single master page and dynamically load user controls corresponding to each s...

Problem entering edit mode on FormView

The problem that I'm having is one that I'm fearing is a design problem, not a coding problem, but I'll ask the question anyway. I have an ASP.NET 2.0 web application that loads two different user controls dynamically based on a value from a database. Inside each of these user controls is basically a FormView control and a SqlDataSourc...

ASP.NET user control - can't get client-side (JavaScript) altered value back into control

Ok guys and gals, here is my problem: I've built a custom control that uses a textbox to present data to the user. When the user interacts with the control the value of that textbox is altered with client side javascript. I also have a button on my page. When the user clicks the button I want to take the value from the custom control...

Inheriting from a UserControl in WPF

I am fairly new to WPF and I am having a problem with inheriting from a user control. I created a User Control and now I need to inherit from that control and add some more functionality. Has anyone does this sort of thing before? Any help would be greatly appreciated. Thank you ...

WPF UserControl - cannot select TextBox

I have a really simple WPF UserControl: <UserControl x:Class="dr.SitecoreCompare.WPF.ConnectionEntry" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="connEntry" BorderBrush="Navy" BorderThickness="1" Margin="5,0,0,5" > <StackPanel Margin="0,10,0,0" > ...

ASP.NET 2.0 Asynchronous User Control Not Working

I'm trying to get a user control working asynchronously, yet no matter what I do it continues to work synchronously. I've stripped it down to its bare minimum as a test web application. This would be the user control: <%@ Control Language="C#" %> <script runat="server"> SqlConnection m_oConnection; SqlCommand m_oCommand; ...

How to create conditional content within a databound Repeater

Hi All, I'm setting up a User Control driven by a XML configuration. It is easier to explain by example. Take a look at the following configuration snippet: <node> <text lbl="Text:"/> <checkbox lbl="Check me:" checked="true"/> </node> What I'm trying to achieve to translate that snippet into a single text box and a checkbox contr...