usercontrols

ASP.NET User Control As FilterParameter

When adding WHERE-clause parameters in a DataSource, you can specify an existing form control (textbox, dropdown, etc) by selecting "Source: Control" and then picking the "ControlID" from the next dropdown. Is there some way to configure a user control so it will appear in the Controls list? OR How can I use a property of the user con...

How can I use the client-side validation of a RequiredFieldValidator in combination with my custom usercontrol?

Using the ValidationProperty I've managed to connect a RequiredFieldValidator with my custom control. When I enable client script in the validator, JavaScript errors occur. Is there a way to tell the RequiredFieldValidator how it can validate my custom control in the client? ...

VS 2008 designer and usercontrol.

Hello, I have created a custom data grid control. I dragged it on windows form and set its properties like column and all & ran the project. It built successfully and I am able to view the grid control on the form. Now if i try to view that form in designer, I am getting following error.. Object reference not set to an instance of an ...

Getting a scriptmanager into a dynamically rendered page

Hi, We are rendering usercontrols dynamically like this: public string RenderControl(string pathcontrol) { string html; var page = new Page(); var control = page.LoadControl(path); page.Controls.Add(control); // do stuff to the control (give it some data to work on) using (var writer = new String...

accessing php javascript object in asp.net user control

Hi, I have a website in php which is using 4 frames(top, left, middle and right). The middle frame contains the web user control coded in asp.net. Now, in the right frame( which is coded in php ) some javascript contains the id of the items selected in right frame. I need to get those ids to the middle frame on asp.net user control. Ho...

Issue with usercontrol BorderStyle

I have created a user control (custom DataGridView control). I have used the example in this MSDN article to set the border style. I am able to see the selected border style in designer. Like None, FixedSingle or Fixed3D. But when I set the border style to FixedSingle, the border does not appear at runtime. Do I need to draw it manual...

WPF User Control hell with MVVM and Dependency Properties

This is what I'm trying to do: I'm writing a UserControl that I want to be consumed by other developers. I want end users to be able to use my control using Dependency Properties. <lib:ControlView ControlsText={Binding Path=UsersOwnViewModelText} /> I'm using the MVVM pattern. I'm binding my ViewModels to their View's using <DataTempl...

Does anyone know of a "Forest control" for .Net? A usercontrol that can display X nodes where each node may have a connection to another node? Almost like a class connection view.

I have a structure I need to visualize. It contains of a set of nodes, where each node has a connection to one of the other nodes. A treeview can not show this as the connection does not follow a treeview structure. Does anyone know of a control that might be able to show this? The best way to illustrate the node connections is like whe...

ActiveX Control with included Form

I'm try develop an ActiveX Control in VB6. It have one UserControl and one form. And the problem that i can't call usercontrol function's (even public) from this form. I can't type something like UserControl.DoSomething 'not working It work's only if create copy of usercontrol (UserControl1, for example). But in resulting i need one o...

Loading user controls programatically into a placeholder (asp.net)

In my .aspx page I have; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="True" %> <%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans...

how to make a base control in silverlight

I have a user control in silverlight which contains both XMAL and .cs file. But I wanna make it into a base control. In other word,I can make a control inherited it whose area in it can be edited. Just like Master Page in asp.net,you know. In the base control,I only have a lot of description in XMAL,perhaps it can be described in the .c...

Setting property default values for a Web User Control

I am trying to build a web user control and set some default values for its properties in the code-behind like this: [DefaultValue(typeof(int), "50")] public int Height { get; set; } [DefaultValue(typeof(string), "string.Empty")] public string FamilyName { get; set; } [DefaultValue(typeof(Color), "Orange")] public System.Drawing.Color...

Is it possible in WPF to have a Panel and be able to add UserControls to it (Similar to Windows Forms)?

I'm going to be making a user control for person information, I will then populate a panel of some sort with the ammount of people found (one user control for each person). Can WPF handle this? ...

Error Message, "The Controls collection cannot be modified because the control contains code blocks"

I'm receiving this error on a page that previously worked fine, in fact the only change I've made to the page recently was to add another asp:TextBox and asp:RequiredFieldValidator control. The page already had numerous ASP.NET controls on it, so I cannot see why these extra controls would make a difference, anyway I shall post the code...

When does a WPF adorner layer first become available?

I'm trying to add an overlay effect to my UserControl and I know that's what adorners are used for in WPF. But I'm a bit confused about how they supposedly work. I figured that adorner layer is implicitly handled by WPF runtime, and as such, should always be available. But when I create an instance of my UserControl in code, there is n...

UserControl Gridview extended with dinamic columns at same

Hi guys i'm with a doubt in asp.net webforms I'm creating a new user control "MyGrid" and i want a pager more dinamic than have: - 1stPage - prevPage - dropdown (with indices of the pages) - Label (telling the total of the pages) - nextPage - lastPage The user control is dont and implementation too, now i have the next problem: ...

Sign out button reloads all user controls

I have an aspx page with several user controls (ascx) as well as an asp:button for signing out. The click event of the button clears the session and does a response.redirect to the login page. However, before the click event is called, since the page posts back, all of the Page_Load events run for all of the controls. What is th...

How can I clear viewstate of a dropdownlist inside a usercontrol? Should I?

I have a web user control with a dropdownlist inside of it. When the usercontrol's databind event is called, it automatically fires the dropdownlists databind event. In the dropdownlist's ondatabound event handler an 'other' option is appended to the end of the dropdownlist. The usercontrol is loaded multiple times, depending on selec...

Ajax in UserControl

Hi i have a signup page and i want to check username exists or not with ajax <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Simple.ascx.cs" Inherits="UserControls_Simple" %> نام کاربری: کلمه عبور i eant to show label if user exists how can i do that? tnx ...

asp.net mvc usercontrol viewdata

i have user control, which i render on several views. i want to show viewdata in the usercontrol, but viewdata must be filled in controller method, so i need to fill viewdata on each controller method of each view, where i render usercontrol. is there any simple solutions? ...