usercontrols

WPF UserControl swapping and preserving keyboard focus

I've got a WPF window where I have a column of buttons on the left side. On the right side I am show/hiding UserControls as the left hand buttons are clicked. I have created the UserControls once and then just switch between them with the buttons. As I switch I would like to retain the keyboard focus where it was when that UserControl w...

ASP.NET UserControl not defined?

I've just inherited an app that utilizes usercontrols in a couple ways which I'm not too familiar with. The problem I have right now is that when I attempt to publish this code base, I get a few errors which boil down to where some referenced usercontrols are not defined. Here's an example of one line: Private clientControl As New ASP...

Visual Studio 2005 Design Time: What is happening, exactly?

I'm interested in getting a definitive answer on what exactly is going on when Visual Studio 2005 loads a form or user control in the IDE's designer (aka "Design Mode"). Ideally, looking for a simple, step-by-step explanation of what Visual Studio is doing to render the form/controls. I understand at some point each control's construct...

How to stop Buttons from moving in inherited form?

Hi, I am experiencing a strange issue and i'm out of ideas on how to fix. I have a couple of base forms (in seperate UserControl DLL) which are inherited by the forms in my application. One of them is for example "FormEditBase" which contains standard buttons like add, update, delete, close In my inherited forms however, these buttons...

breakpoint problem in asp.net

Hi Everybody, I've posted a breakpoint in web user control. But Control is not going on breakpoint. Why is this happening. I have done inline code. <%@ Import Namespace="System" %> <%@ Import Namespace="System.Web.UI.WebControls" %> <%@ Import Namespace="IBlog.Web.HandleUserControl" %> <script language="C#" runat="server"> protect...

Expose UserControl property to XAML

WPF controls have certain properties (UserControl.Resources, UserControl.CommandBindings) that can have items added to them from the XAML of a user control declaration. Example: <UserControl ... > <UserControl.CommandBindings> ... </UserControl.CommandBindings> <UserControl.Resources> ... </UserControl.Resources> </User...

Can an ASP.NET user control determine its context or its parent .aspx file

Is it possible for a user control to determine its "context" or its parent .aspx page in some way? Right now I have a user control that is declared on a typical .aspx page as follows: <%@ Register TagPrefix="uc1" TagName="ManageTitle" Src="../UserControls/ManageTitle.ascx" %> The user control currently emits a textbox as follows: <a...

how to access i statement in usercontrol...

How can I go about accessing the result of an if statement in a user control? UserControl code: public bool SendBack(bool huh) { if(huh) huh = true; else huh = false; return huh; } And in a separate project i am trying to access it like this: private void button1_Click(object sender, EventArgs e) { MyCont...

How set attribute to MVC2 user control type in declarative way

How can I set attribute to MVC2 user control defined in single file with content: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> I'm searching declarative solution. Something like this: <%[DefaultProperty("Items")]%> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> Thanks. ...

WPF UserControl is not drawn when overriding MeasureOverride and ArrangeOverride

I have a UserControl looking like this: <UserControl MaxHeight="32" MaxWidth="32" MinHeight="25" MinWidth="25"> <DockPanel> <!-- some stuff --> </DockPanel> </UserControl> In addition to the min/max size constraint, I want the control always being painted with Width = Height. So i override MeasureOverri...

How can I get to the value of my WPF UserControl DependencyProperty from UI Automation Framework?

Hi, I'm having trouble getting access to my WPF UserControl DependencyProperty values through the UI Automation Framework. I've used James McCaffreys article in MSDN as a starting point (Automating IO Tests in WPF Applications, MSDN March 2009), but I can only see properties etc in standard controls such as buttons. I'm assuming ther...

creating a jquery plugin with user control or custom control please help.

hi, i have read this article and it look really sweet, and what i want is exact same thing to create strongly typed jquery plugins so basicly it is just outputting javascripts, css and html controls. my question though is will it better to do it this way or using a custom control and using the xhtmlwriter or what is the best way and ( i...

Conditionally render a control in a webpage

Hello, For example what if I am trying to hide a custom navigation control what can I place in another webcontrol to conditionally hide the label something like this <mycontrol:hidethis id=mycontrol1 runat="server"> <mycontrol:mynavi runat="server"/> </mycontrol:hidethis> Thanks ...

Strange new error with ASP:Panel / UserControl / UpdatePanel combination

Hi there, I'll try to be as descriptive as possible here. We have some code that was working and now, without being changed, is not. I've isolated the issue, so here is the situation: We have an ASPX page, and on it there are 2 asp:Panel controls(Panel1 and Panel2). In each of these panels, there is a single WebUserControl (Panel1 cont...

ASP.net - First build fails with 'Unknown server tag'

I have multiple custom controls used on a ASPX (and C#) page registered from within the page rather than in Web.Config. On the first build (or rebuild), build fails with error messages for wherever I've used the custom controls. Subsequent builds are successful. The error message: Unknown server tag 'prefix:ExampleControl'. What ...

Read value from one aspx page to another

hi, i have two pages: 1) web control(ascx page) and 2) web page(aspx page without master page). Now i calculate some values on page2 through google api through Javascript on render, and i need to transfer these values to page 1 in a hidden field through code. please help Khushi ...

How to use a Subclassed Control on an ASP.NET Page?

I've subclassed DropDownList to add functionality specific to my application: public class MyDropDownList : DropDownList { ... } ... then referenced it in Web.Config, which is where I figure things start to go wrong: <pages theme="Main"> <controls> <add tagPrefix="bob" tagName="MyDropDownList" src="~/Components/MyDrop...

How to create something like Expander control in WPF using only WinAPI (ATL/WTL)?

Hi! I am newbie in English, sorry :) How to create something like Expander control in WPF using only WinAPI (ATL/WTL)? Are some experince avaliable? Thank for answers! ...

creating new usercontrols at runtime in ASP.NET MVC

Hi everyone, My situation is that the user is creating an entity on my site which contains the particlars of the driectors of that company, name address etc.. The Director form is a separate user control with the appropriate textboxes etc. At run time we don't know how many of these directors there will be so I need one to be able to ...

EF in a UserControl can't see the app.config?

I just created a user control. This control also makes use of my static Entity Framework class to load two comboboxes. All is well and runs without a problem. Design and runtime are working. Then when I stop the application all the forms that contain my UserControl don't work any more in design time. I just see two errors: Error1: The ...