usercontrols

why does my ObservableCollection-bound control jump to 1st item?

I have a TDI, bound to an observable collection of workspaces (all based on Josh Smith's MVVM Demo). On one tab, there is a user control, also bound to an observable collection. If I switch tabs, the user control always jumps back to the 1st item. I'm kinda desperate. I searched since 5 hours now but just I can't figure out why it does...

ASP.NET binding to a UserControl property

This should be really easy but I can't figure out how to make it work... I have an ASP.NET UserControl (.ascx) with the following property: public string LabelCssClass { get { return _labelCssClass; } set { _labelCssClass = value; } } I want to bind that property into the HTML of the UserContro...

How to a string can turn a UserControl

Is there any ways/possibilities that I can replace a string with a UserControl? apart from LoadControl and adding it to another control like page or placeholder. The reason is that a user add a content on the page and put a string like {uc:test} and I would like to parse this text and replace {uc:test} with a UserControl. in other wor...

Refresh UpdatePanel after a "File Download" dialog Box

I have a User control inside an Update Panel. I trigger a Export to excel from inside this user control on button click. Everything works fine. I get the File Download box. When the "File Download" box is closed, I want the updatepanel to post back or refresh. This is because of the following, I trigger a "Please wait" div in the User...

Multi-Column Selector

Hi there. I am searching for some hybrid of ComboBox and ListView and I am wondering why there exists nothing like that, although I feel it's a quite natural wish to have it. In more detail: A WPF ItemsControl should have an ItemsSource of all applicable items. These items have multiple properties, say ID:int, Name:string and Descripti...

I need a UI-Editor for my custom Direct-x UI

I have developed a custom DirectX UI library equipped with everything from buttons to a gridview. I need a screen-layout editor of some sort. It just takes too long to do it by hand, whether through a config file or hard-coding. I could spend a month or two developing a DirectX editing utility, but I don't have a month or two to spen...

How to cache separate instances of user control depending upon a property value

Hi, I've an asp.net user control called UC_Test which has got a public property exposed called param1.It is hosted in aspx pages A and B. On page A, param1 is set to 10 and on page B param1 is set to 20. Depending on the param value, the formatting of user control is controlled. I want page A and page B to cache separates instances of...

ASP.NET: How do I access a property of my UserControl, from within JScript?

I need read-access to a user-defined property of my UserControl, from within a <script> element. This script needs to run when the user clicks on the link (which I also don't know how to setup). Thanks for your advice, SO! Code-behind: public partial class TNLink : System.Web.UI.UserControl { [System.ComponentModel.BindableAttrib...

formatting controls on Page_Load(81 textboxes)

I have a sudoku grid with 81 cells(asp:textboxes) which I've labeled: _c11.._c12.._c13.._c99 I'm trying to format the textboxes on page load. The current code I have is returning 81 controls, but when I do formatting in the last loop its give me a null reference error.. Excuse my horrible coding.. please :) ArrayList sudokuCells = new ...

Proper cleanup of WPF user controls

I am relatively new to WPF, and some things with it are quite foreign to me. For one, unlike Windows Forms, the WPF control hierarchy does not support IDisposable. In Windows Forms, if a user control used any managed resources, it was very easy to clean up the resources by overriding the Dispose method that every control implemented. I...

problem with parsecontrol

hi i have a problem with the parsecontrol() method Control c = this.ParseControl("<uc1:GroupListControl NickName='HARD' GroupName='STUFF' runat='server' ID='Abekat' />"); <-- error Unknown server tag 'uc1:GroupListControl'. Control c3 = ParseControl("<asp:button id='Button3' text='Btn3' runat='server' />"); <-- this works just fine w...

my user control's event not listed on "properties window"

hi. i'm creating a user control with vs2008 (c#), it works well but the events are not listed on the properties window, the "little thunder icon" is not even displayed on the toolbar. WHY??? My event def [Browsable(true)] public event ImageClickEventHandler DeleteButtonClick { add { IbDelete.Click += value; } ...

Derived ASP.NET UserControl not visible in VS2008 designer

Hello! I have an abstract base class derived from UserControl (called BaseControl) and several other classes inheriting from this BaseControl class. BaseControl class gets typed to f.ex. TextBox or DropDownList and then in its constructor i create a new instance of this type. Everything is working just fine otherwise, but for some reas...

jquery UI Modal Dialog in asp.net usercontrol: Modal Overlay only on Div in UserControl

Hi All, I have an asp.net usercontrol that contains a jQuery UI Dialog Control. All works as expected execpt the grey tranparent overlay (to make the form modal) only appears on the hidden div below the form where the dialog is triggered from. Is it possible to target this overlay to the parent div? or is this not the right solution. ...

Blend not rendering images in User Control

Hi, I am developing a WPF application, and I have created a user control called ViewIconUC. This control lives in an assembly (MyControlAssemblyUI). I can instantiate the control in a ZAML page within this control, and I get no errors (I even attached the dugger to Blend to check), and I can see the button background I set in the control...

Generic Obeserver Pattern for User Controls

Hi there, I want to implement a generic Observer Pattern for user controls. What is the best way to do this? There are 3 usercontrols: A, B & C. Each of these usercontrols is a representation of a set of data. Each control has a select for display mode (basic or detailed). The site visitore gets to choose which mode. On changing the ...

Secure custom login control ASP.NET

Problem: I want to create a custom log in control that posts securely to HTTPS without affecting other submit buttons on the page. If I had been writing this in ASP.NET MVC or any other language for that matter, I would just create a new form tag with an form action="https://...". Now I'm stuck in a ASP.NET web forms site. That means th...

ASP.Net Declaratively Passing Value from Page Property to User Control

I need to find a way to declaratively (not in the code behind file) pass the value of a property in an ASP.Net web page to a user control. Following is a simple example of what I'm trying to do, but I can't get it to work. Here is the markup for the aspx page where I'm creating an object of the user control: <%@ Page Language="C#" Auto...

Creating a default image in a UserControl

I have a User Control that has one child - an Image. I'm trying to set a default image using code in the User Control's default constructor to display an image resource, but so far with no success in either Blend preview or when I actually use it in a running app. I do not get any errors either. Shouldn't this be possible? Here is the X...

Determining which User Control to call based on browser

I have two user controls in my ASP.Net project, one that is explictly for use with Internet Explorer 6 (IE6) and another that should be used when the user's browser is not IE6. How would I go about setting it up so that this happens; is this something I can put in a master page? ...