usercontrols

Launch User Control in a tab control dynamically

I have a custom built menu system in which I would like to load user controls from another project into a tab control on my main project (menu control) User control Project : foobar Menu system Project : Menu The function to load them into the tab control: private void LaunchWPFApplication(string header, string pPath) { ...

ASP.NET Controls with Highly Customizable GUI

We are developing an ASP.NET web application where some of the features that we will need to implement are quite standard: for example, a chat between users, a forum, etc. There are ASP.NET chats and forums components available. However, they all have a predetermined GUI and html markup that is almost impossible to change and very diff...

Tabs in asp.net mvc

I have three tabs on page and one user control. I want to RenderPartial on each tab. <script type="text/javascript"> $(document).ready(function() { $("#tabs").tabs(); }); </script> <div id="tabs"> <ul> <li><a href="#tabs-1">Text 1</a></li> <li><a href="#tabs-2">Text 2</a></li> ...

user authetication in django

Hi iam trying to login user in to my web page if uername and password are correct then the user is graned access to chat simple enough. But my problem is when i try to access the page http://localhost:8000/login it says MultiValueDictKeyError at /login/ any help woud be appreciated thanks ...

Silverlight4 + C#: Using INotifyPropertyChanged in a UserControl to notify another UserControl is not notifying

I have several User Controls in a project, and one of them retrieves items from an XML, creates objects of the type "ClassItem" and should notify the other UserControl information about those items. I have created a class for my object (the "model" all items will have): public class ClassItem { public int Id { get; set; } publi...

WPF UserControl event called only once?

Hi Everyone, I need to bind two-way a property of a user control to a property of a containing user control. I also need to set a default value to the property from code in the child (cannot be done easily from XAML tags). If I call my code from the child constructor, the value is set in the parent but the change callback routine is no...

User controls in masterpage and anonymous user

I am developing a master page which includes the user control that generates a menu from the list with a specific logic. Before including the control into master page I successfully configured anonymous access to the site. After including the control and deploying - site prompts for user name and password. I allowed the anonymous acce...

How do I call C++/CLI (.NET) DLLs from standard, unmanaged non-.NET applications?

In the unmanaged world, I was able to write a __declspec(dllexport) or, alternatively, use a .DEF file to expose a function to be able to call a DLL. (Because of name mangling in C++ for the __stdcall, I put aliases into the .DEF file so certain applications could re-use certain exported DLL functions.) Now, I am interested in being ab...

C# UserControl factory

Let's say you have two classes that extend UserControl. Each of the controls provides a custom event (this could be done by using an interface). You want to display one of the controls in the odd days and the other in the even days. You also want to be able to drag&drop (Visual Studio) the UserControl on your form without knowing what ...

Getting data from child controls loaded programmatically

I've created 2 controls to manipulate a data object: 1 for viewing and another for editing. On one page I load the "view" UserControl and pass data to it this way: ViewControl control = (ViewControl)LoadControl("ViewControl.ascx"); control.dataToView = dataObject; this.container.Controls.Add(control); That's all fine and inside the c...

Define interface for loading custom UserControls through reflection

I'm loading custom user controls into my form using reflection. I would like all my user controls to have a "Start" and "End" method so they should all be like: public interface IStartEnd { void Start(); void End(); } public class AnotherControl : UserControl, IStartEnd { public void Start() { } public...

WPF: How to dynamically find a usercontrol or datatemplate

I have a bunch of datatemplates I use to display various sql-views in an ItemsControl. I don't know which datatemplate i'm going to use until run-time. (every view has different columns) Next to that, I made a generic dynamic datatemplate for all those views that don't need anything special. When I display the view I want to first look ...

Binding different real time updated ObservableCollection to same userControl template

I have a UserControl with template property on, and a listView where i want to bind my collections. I use them for a multiple window interface. How can i bind on several different windows (child template), different collection which are updated in real time. My example is for a sniffer with multiple interfaces packet capturing. Thank u ...

Binding custom class property of an ASP.NET control from ASCX markup

I have an ASCX that inherits from a WebControl that has a 'CustomConfiguration' property of type CollectionConfigurationItem. This configuration gets set elsewhere in the code, so by the time it gets to the ASCX it is set up to how I wish to use the data. At this point I'd like to render out another control using this configuration, li...

.Net: How to use a WPF user control in a windows forms application?

How to use a WPF user control in a windows forms application? ...

How to use multiple instances of a usercontrol (with jquery) on the same page

Hi All, I've been working on an usercontrol with a jquery timer in it. At first I had the jquery within the usercontrol. But when I add 2 of those controls to my page the second usercontrol isn't showing it's data very well. Now I've put the jquery into the mainpage and the usercontrol only uses the id's of the jquery. Here is my user...

Add property to an ASP.NET MVC 2 ViewUserControl

I have created a ViewUserControl in my ASP.NET MVC 2 project. This ViewUserControl serves as the general page-header for all views in the project. How can I add a custom property on ViewUserControls, accessible from views using that control?..: <%@ Register Src="../Shared/Header.ascx" TagName="Header" TagPrefix="uc" %> <uc...

How can I dynamically clear all controls in a user control?

Is it possible to dynamically (and generically) clear the state of all of a user control's child controls? (e.g., all of its TextBoxes, DropDrownLists, RadioButtons, DataGrids, Repeaters, etc -- basically anything that has ViewState) I'm trying to avoid doing something like this: foreach (Control c in myUserControl.Controls) { if (...

WPF usercontrols on separate tabs: why is radiobutton groupname shared between tabs?

I am using a WPF tab control to present separate repeated instances of a user control. i.e. Tab1 for Item1 settings, Tab2 for Item2 settings, and so on. It appears that the radio button group names are being shared between tabs. What is going on? Simple example: A window contains tabs. Each tab contains a user control. <Window x:Clas...

how to load wpf usercontrol in MVVM pattern

Hi, I'm creating a wpf user control which is in mvvm pattern. So we have : view(with no code in codebehind file), viewmodel,model,dataaccess files. I have MainWindow.xaml as a view file, which I need to bind with MainWindowModel.cs. Usually, in a a wpf application we can do this with onStartUp event in App.xaml file. But in user contr...