usercontrols

Too much control is bad. But when?

I remember reading a law (well, maybe not exactly a law), but in software design, providing user with a lot of control without really giving him an option of a Basic and an Advanced Mode will sometimes backfire and make the user to end up not using any of the options in the first place because they are just too many of them. Did I read t...

User Control ViewState/State Help needed

I need help making this code work better. Currently, what happens is when it reloads, I loose the third value which is a calculated value . I would like for my page to reload without loosing the values for each property and each instance of the user control on the page. Thanks in advance Private _Length As Double = 0.0 Publi...

How to control usercontrol from javascript

I have an usercontrol with an attribute targetUrl. I add this user control to a page and write targetUrl attribute from this page like below: <PBG:Modal ID="Modal1" runat="server" Height="180" Width="500" src="pop_adres_giris.aspx"/> This worked properly, but I want to change the targetUrl a...

Fixing .NET code generation of properties for user controls

I have a property of type IEnumerable<SomeClassIWrote> in a user control. When I use this control in a GUI, the .Designer.cs file contains the line: theObject.TheProperty = new SomeClassIWrote[0]; Which for some reason causes a compiler warning: Object of type 'SomeClassIWrote[]' cannot be converted to type 'System.Collections.Generi...

WPF control design guidance - timeline

I'm working on a control for one of our apps. The control shows the currently focused day as a gird, the X-axis being time of day. The Y axis doesn't have a scale as such, rather it will separate out the items to be displayed. The overall look of the control will be quite similar to a gantt chart, showing the times of day of various t...

Command Binding to Usercontrol Drag/Drop.

How to respond to Drag/Drop events of a usercontrol by usinng the commands pattern? ...

WPF Binding Confusion: Composite DependencyObject

I have a DependencyObject class composition that looks like the following: public class A : DependencyObject { public AB AB { get { ... } set { ... } } public AB AC { get { ... } set { ... } } } public class AB : DependencyObject { public string Property1 { get { ... } set { ... } } public string Property2 { get { ... } set { ... }...

job scheduling in linux

hi, I want to schedule access to some website for a limited period of time say for 1 hour every day. How can i do that using cron job in linux. or can i do that using linux squid server?. ...

ASP.NET ITemplate with TemplateInstance.Multiple

I can't seem to find any examples on how to implement ITemplates with multiple instances. All I need to do is build out a navigation that has a template for the content of each navigation item. ...

What is the maximum number of lines a TextArea control can hold?

I have an app that has text appended to a TextArea (TA). It automatically scrolls to keep the recent line added in view. Over time, this could be a lot. Do I have to worry about this? Is there an upper limit? And, if so, how can I prune the oldest lines of text? ...

Does it make sense to test ui components seperately?

I'm working on a webform that has about 15 user controls, separated by context (comments, locations, members/leaders, etc).   If each control can render individually (using real or test data), does it make sense to have a seperate "functional" test page to test them in isolation or is there a better way? ...

Usercontrol getting lost on hitting submit button in asp.net

I am loading a usercontrol in code-behind as show below Dim AdjFormctl As UserControl = CType(LoadControl("~/Controls/AdjForm.ascx"), UserControl) Dim EMPFormType As Type = AdjFormctl.GetType() Dim EMPPK As PropertyInfo = ABCFormType.GetProperty("employeePK") AdjFormctl.ID = "ucAdjForm" EMPPK.SetValue(AdjFormctl, Convert.ToInt32(txtEMP...

Getting "Property value is not valid" message when Control is in Design Mode (VS 2008)

I am getting dialog box "Property value is not valid" when the Control is in Design Mode (Visual Studio 2008) and I try to change the Property's Value. Here is the property in question: <Description("Gets/Sets the visibillity of the SaveButton of Control")> _ Property ShowSaveButton() As Boolean Get Return _SaveVisible ...

ASP.NET UpdatePanel not working with Firefox

I'm trying to do something that sounds fairly simple using ASP.NET 3.5. A user should be able to add a "Community" to the database, and upon checking a box, pick a Parent Community from a DropDown menu that shows only if the check box is checked. For this I used a Panel (initially set to Visible=false) inside an UpdatePanel. My problem i...

How to stop postback when calling usercontrol

I have a ModalPopupExtender control and a panel which contains a iframe. The ModalPopupExtender's TargetControlID property is set to a html button control named btnFind. When I click to find button, the panel with its iframe control shows as a modal popup. This is work fine,but then I decided to take these control to an usercontrol a...

Silverlight: Add same UserControl to more than one Canvas

I have a bunch of UserControls ('MyUserControl') that I want to have a user manually add to one or more Canvases. One instance of a UserControl cannot be a child element of more than one container (otherwise a 'System.InvalidOperationException: Element is already the child of another element.' is thrown). Is there a way to do this witho...

User controls in ASP.NET MVC

I am loving MVC but can't see to understand how your meant to implement User Controls. If I have a Multiple views each with shopping basket details how can I encapulate the shopping basket view and code so I don't have to return the basket data with each controller viewdata? ...

ASP.NET User Control declaration in designer.cs file

Hi, On my .aspx page, I have the following declaration to user my user control: <%@ Register TagPrefix="uc" TagName="ProductCategoryMenu" Src="~/Resources/Common/Controls/productCategoryMenu.ascx" %> <uc:ProductCategoryMenu ID="ProductCategoryMenu" runat="server" /> Whenever the .designer file autogenerates, it declares protected gl...

Seeing new properties on a custom UserControl in Visual Studio

I have two C# .NET projects in my solution. One project is a DLL that contains a WinForms custom UserControl. The other project is a WinForms EXE that references and uses that UserControl on a Form. I have added a handful of properties to the UserControl so that when I place the control on a form I can easily set these properties in t...

Looking for a UserControl which supports ANSI escape codes.

I am looking to handle incoming telnet text that has ANSI escape codes. For the bounty I am looking for a full implementation where I can just append text to the end of a buffer. The control should be scrollable, yet still be able to handle appending text, cursor positioning, etc.. while the user is scrolled out of view. For example, ...