usercontrols

WPF: how to implement a UserControl to edit line-points ?

I have a class with a member ObservableCollection<Point> Points; I want a custom usercontrol that shows a canvas with these points on it, drawn as a closed polygon, and the user should be able to select and move individual points. I've googled around and found a lot of stuff on adorners, moving controls etc., but I'm still confused ...

asp.net perform action after child controls databound complete

hi all, I have a usercontrol that acts as a container to hold more usercontrols within it. I need to perform certain access checks once all of the child controls have databound. I was hoping I could attach to a usercontrol.databound event but there does not seem to be one. What other options do I have to do something on the parent u...

Validation in ASP.NET User Control

I have an ASP.NET user control in which there are two fields (fromdate and todate) which have RequiredFieldValidators associated with them. When saving I want to validate if the fromdate and todate are entered. How do I do that? I have tried Page.IsValid, but it always returns true. ...

Does anyone know of an ASP.Net E-mail control/user control?

Hello, I'm implementing a messaging system in my program. It functions just like e-mail except that it is entirely contained within the system. I was wondering if anyone has seen an e-mail control template that I could modify. It would have stuff like an inbox, message viewing and message sending parts. I would just rewire the mail se...

jQuery and UserControl Property access

How can I access a asp:userControl's property using jQuery $("#<% =ucControl1.ClientID%>").find("[id$='Panel1']").hide(); I am trying to show an asp:Panel with the usercontrol and it doesnt work. <div id="ctl00_ContentPlaceHolder1_ctl02_ucControl1_Panel1"> content.... </div> The jQuery rendered is as follows: $("#ctl00_Content...

c# User Control Navigation

I am making a c# windows app that has one MainForm and many User Controls (LoginPage, HomePage, MyListPage, etc.) embedded inside it. I am using Visual Studio 2005 to design the GUI. In MainForm's constructor I do: Controls.Add(new LoginPage()); Controls.Add(new HomePage()); Controls.Add(new MyListPage()); ... LoginPage.show(); But ...

Printing ASPxTreeLists

I have an ASPxPageControl with tabs containing Usercontrols for some ASPxTreelists. My question is how do I print them exactly as they are keeping the Dev Express style and coloring. Thanks! ...

How do I make my VB.NET custom button work?

I made a custom button to input keypresses: <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class KeyInputButton Inherits System.Windows.Forms.Button 'UserControl1 overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(...

WPF, cannot bind a property because it says it's not a DependencyProperty, but I registered it

I have a UserControl with a Template property that I've set up as a DependencyProperty: public partial class TemplateDetail : UserControl { public static readonly DependencyProperty _templateProperty = DependencyProperty.Register( "Template", typeof(Template), typeof(TemplateDetail) ...

Controls null when using a UserControl between projects

TL;DR: All controls within a usercontrol that's being used outside it's home project are null when that usercontrol's Page_Init/Page_Load methods are called. The setup is like this: Projects "UI.Frontend", "UI.ControlPanel", and "UI.Common" are "ASP.NET Web Application"s. UI.Common is never meant to be accessed directly- it just conta...

LinkButton in UserControl posts back but does not fire OnClick.

I've been looking at google for the past few hours, trying to find an issue to a apparently simple problem. I have a UserControl named RolloverLink that basically contains a asp:LinkButton and a <img /> . I tried setting the OnClick handler like this: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RolloverLink.ascx.cs...

ASP image button onclick event does not fire in IE, works in Firefox and chrome

Onclick event of imagebutton (inside usercontrol) does not get fired in IE, it works in Firefox and chrome. The usercontrol contains some required field validations as well as a popup. Code below: <asp:ImageButton ID="btnSend" ImageUrl="~/images/send.gif" ValidationGroup="SiteFeedback" CausesValidation="true" runat="server" Ta...

MS Reporting 2010: Use Multi-Value Drop-Down to Add/Subtract WHERE clause from SQL Query

I am currently trying to create a report in Visual Studio 2005 for MSSQL 2005. I need to provide a multi-valued drop-down box that would allow a user to select one or more options. If a user selects one or more of these options, my SQL statement would need to add a AND column = 'something' to my SQL query. I am wondering how I might acc...

Partial User Control

In Asp.net Web forms why must a user control be partial? I tried to remove the partial keyword and it says: Missing partial modifier on declaration of type 'test'; another partial declaration of this type exists Where is the other declaration? I am trying to pass a generic type with the user control how can I do that? I can...

How do I expose custom control properties inside a user control?

I have a custom control called TextBoxWithLabelAndUnits. From the name, you can tell that it's a TextBox that has a Label before it and a Label after it, so that the custom control looks like this: ----------------- Label: | | units ----------------- I expose several dependency properties to configure the c...

How to properly use a Subclassed silverlight control?

Hi guys, I created this class where I wanted to override this specific event for the content control. public class MyContentControl : ContentControl { protected override void OnKeyUp(KeyEventArgs e) { //do something //.......... e.Handled = true; } } However when I am using this control in my XAM...

How can I add additional bindable visual state groups to a button?

I need to extend a button control to add some additional, bindable, visual states. What I would like to create is an additional boolean property, to bind to, that will create a simple visual state change on the button. For this example, it could just be an additional border which changes colour according to the boolean value. All the ...

Add a list of self created web user controls to a listview in codebehind fails

Hi. I have a listview which I would like to fill with self created user controls.But the problem is that the properties in the user control is not set. The usercontrols are displayed but the property values I enter is not set. Why is that? Here is the aspx code. <div id="productView" class="productsMain"> <div id="groupHeader...

Is it possible to handle a MasterPage event in a UserControl (C#)

Hi, I've seen code to handle MasterPage events in the content Page, but if I'm loading a UserControl dynamically into the Page, can I handle the event in the UserControl instead? Basically I have a button on the MasterPage, when it's clicked I need to make the UserControl do something, such as display text or change a value in a form. ...

Why has moving GridView code to an ascx given an "Databinding expressions are only supported on objects that have a DataBinding event" exception?

I created a GridView in code with a DataTable as its data source which worked fine. I have now moved the GridView creation into a .ascx file to make it easier to format. For some reason this has started triggering the HttpParseException: Databinding expressions are only supported on objects that have a DataBinding event. Syste...