usercontrols

WPF: access controls from usercontrol

Hello! I have a usercontrol whit a RichTextBox control and a TreeView, and I want to bind a commands like Copy, Cut, Paste etc which are in Window not in usercontrol but I dont know how to access Elements from usercontrol? Any ideas? ...

Prevent Adblock Users from Accessing Website?

Im one of the Users who use Adblock. And i love it. That question could be interesting for all of us. Once i visited a german developer website, I just saw a jquery fancybox, on that box there was a Message something like this: "You are using Adblock, this site is financed with ads. If you want be able to see the content deactivate Adb...

save Load User Control Dynamic to viewstate

Hi, i add user control dynamcly to the page and trying to save to viewstate when i triyed to save the placeholder to the view state i got this error " PlaceHolder is not mark as serializable." here is my code Controls_PriceControl ctrl = (Controls_PriceControl)LoadControl("../Controls/PriceControl.ascx"); plcPrices.Controls...

Inheriting from a User Control to use a different child Control

I have a user control, GridMasterControl which contains (amongst other things) another control called Grid. Now I need to inherit from Grid to create EditableGrid (to add editing functionality to the grid). I then need to create an EditableGridMasterControl which will be identical to GridMasterControl except that it will use EditableGr...

ASP.NET User Control

Hello, I have this user control: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cite.ascx.cs" Inherits="cite" %> with behind code: [ParseChildren(typeof(Reference), DefaultProperty = "References", ChildrenAsProperties = true)] public partial class cite : System.Web.UI.UserControl { public cite() { this.Refe...

How to create a reusable grid view component like date time picker in asp.net?

Hi, I want to create a reusable user control which contains a date time picker in asp.net. Need to add this user control in a grid view as column.While clicking the column,date time picker has to be displayed.Which is the suitable method,Creating the component or creating the user control.Also want to know,How to add this component in...

Asp.Net: Pager in Usercontrol not paging

Hi all, I have a listview control and a datapager control in a ascx page, this is then embedded in the aspx page. When my page loads the records come up, and the page numbers appear in the pager, however, when I click on any of the page numbers, the page is always blank, no records. Are there any known issues with the pager in a userc...

Implement Dispose(bool) on a UserControl

How to implement the Dispose(boolean) at a UserControl... when the VS Designer already implemented it with a DebuggerNonUserCode attribute? Will my modifications on this method removed? (code from UserControl.Designer.vb) <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) ...

How can I change `All Desired` properties of the windows controls?

I'm using WinForms : C# .NET. I'm facing a problem with ContextMenuStrip and Toolstrip. Visual Stuido's Property editor is not letting me to change the property I want. Here is the snapshot of how I want my ContextMenuStrip to looklike & same is the case with Toolstrip. I don't understand how to do this. If I need to learn something,...

asp.net user control event propagation trouble

I have a simple user control that contains some buttons that fire events which I want to be handled by the page using the control. I have my code setup as such: public event EventHandler Cancel; public event EventHandler Confirm; public void Confirm_Click(object sender, EventArgs e) { if (Confirm != null) Confirm(this, e); }...

What properties ( if any ) do controls like GridView and TextBox save in their control state?

hi 1) What properties ( if any ) do controls like GridView and TextBox save in control state? BTW - I assume these controls have their control state enabled by default?! 2) Control needs to call Page.RegisterRequiresControlState ( during Init event ) in order to signal that its control state needs to be persisted. Assuming contro...

user control with databinding can't be used more than once.

I have a custom UserConrol in a Silverlight 3 application. The control uses databinding for some properties, so I need to give it a name. When I try to put more than one of these controls in my main silverlight control, I get a XamlParseException with the message "The name already exists in the tree". How can I use this control more ...

How to bind an observable collection to Multiple user controls at runtime?

Hi, I am stucked at the part where I have to bind a collection to a dynamic usercontrol. Scenario is something like this. I have a dynamic control, having a expander , datagrid, combobox and textbox, where combox and textbox are inside datagrid. There are already two collections with them. One is binded with combobox and another is bind...

WPF Close UserControl in Frame and access Parent Controls

I have a WPF app with a Window (RootWindow) with a Toolbar and a Frame (ContentFrame). Initially the Toolbar is hidden. I load a Login UserControl into the Frame and when the user correctly logs in I'd like to close the UserControl and then make the Parent Window toolbar visible. Seems such a simple thing to do. However, you cannot cl...

Adding user control to ASP.NET webform, but don't want it to declare itself in designer file

Does anybody know if it's possible to add a user control to a web form in Visual Studio 2008, but to not have its declaration added to the designer file? ...

Is there a way to add client methods to ASP.NET user controls?

I recently discovered the client-side methods of some of the controls in the Microsoft ajax control toolkit. For instance, with the TabContainer, I can do something like this: $find('tabsEditJob').get_tabs()[1].set_enabled(true); without having to resort to server side code. Is there a way to do this in your own custom user controls...

Create a dropdown list of valid property values for a custom control

I've created a custom user control that has several properties. One specifies which database I want the control to access. I want to be able to present the user of the control a drop down from which he can select which database the control will interact with. How do I get the dropdown to work? I can get default values, but have yet to ...

Contents of a code-behind file is rendered instead of a control.

I have a user control which is being added to a page dynamically. It works fine on my computer whether a site is running on an integrated Visual Studio server or deployed to IIS. But when the site is deployed to a production server, I see the contents of a user control's code-behind file instead of a control. Have you any ideas what can...

Adding and removing controls and memory usage in WindowsForm

I have a WindowsForm with a panel control which I use to display my UserControls. I add controls this way: private void AddControl(Control control) { panel.Controls.Clear(); control.Size = new Size(panel.Width - 1, panel.Height - 1); control.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles...

Control SVN users with PHP Subversion API?

Is it possible to create/delete/modify SVN users with the SVN PHP API? Thank you. ...