usercontrols

ASP.Net excessive use of User Controls

Hi, I'm investigating an asp.net web application that extensively uses User Controls on each page. Most pages contain around 10-20 user controls. The User controls seem to be the visual representation of the business objects (if that makes sense), although at a finer granularity such as each tab of a tab control having its contents in a...

user-control to nested usercontrol communication in asp.net

I have a ProductBox.ascx user control which I use as ItemTemplate for a DataList as i have to repeat it.Now that datalist in inside a seperate user control ProductGrid.ascx.There is a third usercontrol ProductPopUp.ascx.All these controls are on page User.aspx. I want to access ProductBox.ascx from ProductPopUp.ascx. I want a loosely co...

Embedding User Controls a bad idea?

I am embedding usercontrols in a panel and using DevExpress Navigator control to navigate from one to the other. What I am concered about is any implications to this method? I would give examples of what I am concerned about but then I wouldn't need to ask this question... I have a primary form, ShellForm that has a docked Navigator...

MasterPage and UserControl Interaction

I have a situation where I need to update a control referenced in a masterpage from a control that is referenced from the content page. Below is hierarhcy: MainMasterPage BreadCrumbUserControl(a user control) - has a public string property ContentPage(uses MainMasterPage) DataUserControl I want to be able to upda...

Server Control Event Handler?

Hello, I have a drop down list that appears throughout my site. For code re-usability purposes I made it a Server Control. Everything was working great. However I would like to add a event handler for SelectedIndexChanged This is not working for me: this.OnSelectedIndexChanged = "CultureSelectorControl1_SelectedIndexChanged"; followe...

How to use this usercontrol?

http://www.codeproject.com/KB/ajax/TunaUpdatepanel3.aspx The link above contains class that extends the UpdatePanel usercontrol. How do I import it to a project and use it as a usercontrol as followed: <uc:TunaUpdatePanel ... runat="server" /> UPDATE #1: The proposed solution of moving code into an ascx file does not work. Below ar...

Silverlight OLAP Data Grid?

Hi there, Is there any control around where I can have something like Flex OLAP Data Grid for Silverlight? I tried to create one on my own, but hitting the wall all the time, if there aren't something like this in the market, can we brainstorm a bit on how to approach creating a control like this? Thanks ...

ASP .NET: Dynamic load controls vs Visible = true

Which one is recommended ? Let me explain what I want to achieve ! I have one pages used by many users, every user has a different Role like admin, operator, normal user. When a client open that page I want to display a set of controls (buttons) which depends on their Role. admin is allowed to do x and y, but a normal user is not allowed...

WPF: reverting brush to default/original

Hi, I'm a complete newbie at WPF. At the moment I'm making a usercontrol for form elements called "LabeledTextbox" which contains a label, a textbox and a textblock for errormessages. When the using code adds an errormessage, I want to put the border of the textbox in red. But, when the errormessage gets removed, I'd like to turn ba...

WPF: Clearing all errormessages in an elegant way

Hi, I'm a complete beginner at WPF. I've made a usercontrol "labeledTextbox" that holds a label, a textbox and a textblock for errormessages. When the user hits the submit button, I call SomeValidationMethod() to validate the user input. When one of the textboxes contain invalid data, I pass the errormessage to the corresponding user...

How to put a custom windows forms control in a WPF application?

As a short term solution I'm trying to jam a windows form 'usercontrol' into a WPF application. I see in the WPF application view that I can add a 'custom windows form control' to the project and it makes an empty custom control, but I can't figure out how to add it. Ideally I'd like to know how to take the .dll from my compiled window...

ASP.NET User Control Partial Caching by variable values

How is it possible to create various cached versions of a user control based on a field within the control. So for example I have a user control that has the following declaration: int someInt = 0; Let's say this variable could be set to any value between 1 and 10. If I want a separate cached user control for each value of the variabl...

How to create Dynamic User Control in Page

<% for (int i = 1; i <= 16; i++) { cami = i; cami++; //DataBind(); %> <cam:CamControl ID="Cam1" CamID=<%# dcami(cami) %> runat="server" /> <% } %> ...

wpf usercontrol, bind command parameter of button to the parent usercontrol

Hi, I've got a WPF UserControl which contains a remove button, I'd like to pass the entire UserControl as the CommandParameter. Currently the binding is set to CommandParameter="{Binding RelativeSource={RelativeSource Self}}" which gives me the button, but how can I get the entire control? Can anyone assist please? Cheers, Andy <Us...

Content is not allowed between the opening and closing tags for user control

I want to build a user control suppose MyDiv.ascx. This control renders the div tag and do few more code behind stuff like adding few attributes etc which is not a matter of concern here. The problem is I want text between the opening and closing tags of the user control. Eg: The text goes here with some other HTML tags. So when do...

Why do I get a http response 206 when loading a .Net control .dll (activex) file in IE?

So I'm still struggling with the sucky fact that if you make a .net user control deploy as a .dll file to embed it in IE you have to have the user add the site as a trusted site AND modify their .Net security settings. If I don't do the above two things (add trusted site and modify .Net security settings) I get a http response 206 when ...

multiple usercontrols

Hi, Let's say we have 2 usercontrols uc1 and uc2 in a Page. I set the Viewstate["name"]="John" in uc1. How do I access this Viewstate["name"] in uc2 control? ...

Overlapping TextBlock and TextBox in Grid. TextBlock blocks manual data entry

Behold the code below: <Grid> <TextBox>BOX</TextBox> <TextBlock>block</TextBlock> </Grid> The words block and BOX are written over eacht other and no keyboard input is possible in the textbox. Now consider this: <Grid> <TextBlock>block<TextBlock/> <TextBox>BOX<TextBox/> </Grid> The TextBox covers th...

What should I use to have users log into my ASP.net application?

Should I create a userControl with two labels, two textboxes(for user/pass) and a button for submit? Am I approaching this in the correct way? ...

Create user control from query count command in sql server

i have data in sql server and i want to create user control for query example to count that result 16 and how to add 16 user control to page and easy? ...