usercontrols

Focus on TextBox when UserControl change Visibility

I have a usercontrol loaded inside a canvas; this usercontrol on default have visibility collapsed. When a specific textbox of my window is focused the usercontrol become visible. When usercontrol become visible I want set focus to another textbox inside usercontrol. I try to do that: private void UserControl_IsVisibleChanged(object s...

Passing User Control Class to Host Page

How can I pass user control properties to the page AND make these properties available to all methods on the page (and not just to one method that is fired on a control action, e.g. onControlClick) I have a set up of essentially 3 pages: user control (ascx/cs) class (cs) - that contains user control properties host page (aspx/cs) - re...

How to make Twitter app style Quick Actions on Android

Is there any code that gives an example about how to implement the Quick Actions and Popdown menu that is displayed in the Twitter for Android app? ...

Storing number of dynamically inserted controls for postback

I need to create the following functionality, and looking for the best way to store info on multiple postbacks: Say I have a TextBox, that is related to a question, i.e. "Places I've visited". Once TextBox will be loaded on first load. Under that, there is a button to "Add another place". This will postback, which will then add another ...

adding usercontrol to aspx page.

The base class includes the field 'WebUserControl1', but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx) my code: <%@ Register Src="~/LoginControl.ascx" TagName="TagLogin" TagPrefix="Login" %> <Login:TagLogin id="CtrlLoginControl" runat="server"></Login:TagLogin> wats wron...

ASP.NET Custom Control - Naming Container

I have 2 user controls, I is used as a container for the other: <mc:Container runat="server" ID="container"> <mc:MyControl runat="server" ID="test"> </mc:Container> The mc Container has a default inner property called content which is a collection of MyControls. The markup above is inside a FormView, and when I call FindControl on...

Can I hide a user control in a master page from a content page?

How can I hide a user control on the master page from a content page? This is code I have on my content page's load. Dim banner As UserControl = DirectCast(Master.FindControl("uc_banner1"), UserControl) banner.Visible = True Does nothing for me :( ...

A usercontrol in a page with a querystring doesnt postback

Hi there, I have a usercontrol that is in an asp.net page that contains a button. The event on the button does a simple response.direct all is fine if the page doesnt contain a query string however if the page contains a query string. e.g. default.aspx?id=12345 then the postback doesnt occur on the button. Is this a common issue? what d...

Problem with actualheight of a user control

Hello, In my WPF app I have the following user controls: <UserControl Name="UCOperand" ...> ... </UserControl> <UserControl Name="UCOperation" ...> <ItemsControl Name=ic_items>...</ItemsConrol> </UserControl> The UCOperation user control can contain UCOperand user controls in it's "ic_items" ItemsControl. Now I have a design p...

ASP.NET: Controls are null when I try to change a property.

Created a user control. Within user control, I have a simple control, like a Literal, in the markup. In the user control's Page_Load, I attempt to change a property, like Text, on control created in the markup. Control is null. What in the world am I missing? (Begin rant: I am doing all these fancy things with login systems ...

WPF OnKeyUp in UserControl not firing

I have Window with UserControl. I subscribed for OnKeyUp event but it does not firing. Inside UserControl constructor i use method this.Focus(); But still onkeyup does not firing. What is wrong and what i can to do to catch this event? ...

Do ASP.NET user controls always have an ascx file extension?

Okay, maybe it's a bit pedantic, but do ASP.NET user controls HAVE to have an ascx extension? My reason for wanting to know this is purely academic. I made the statement to someone that they usually have an ascx extension, but then I had the curious thought of if that was always true or not. ...

Asp.Net single control render for AJAX calls

I'm trying to implement something similar to this or this. I've created a user control, a web service and a web method to return the rendered html of the control, executing the ajax calls via jQuery. All works fine, but if I put something in the user control that uses a relative path (in my case an HyperLink with NavigateUrl="~/mypage....

jQuery and User Controls

Question regarding jQuery and User Controls I have a series of User Controls and within each user control is a client side method that validates all required fields are validated. I would like to call theses user control's client side methods from the host page when submitting a form. Does anyone have code to do this or lead me to an e...

WinForms UserControl image resource

I am developing a user control and want to save an image as a part of that control. I added the image to the control resource, but I can not access the image using code (like Properties.Resources.etc) Any tips? ...

jQuery find elements of class name within same container

I have a UserControl in MVC which may be repeated many times on the page. Say I had something like the following: <div> <a href="#" class="enableTextBox">edit</a>" <input type="text" class="comments" readonly="readonly" /> </div> <div> <a href="#" class="enableTextBox">edit</a>" <input type="text" class="comments" rea...

Multiple User Controls on ASPX page problem

I have three user controls on an .aspx page, each user control has 4 drop down list which draws its data from the SharePoint 2010 ListData.svc using jQuery to added each list. When I go to my hosted .aspx page, only the first user control contains data in each of the drop down list, and the other user control lists are empty. Also, the f...

Have a WPF Control Class being a template class

Hey, is there a way to have a WPF UserControl Class to be a class with a Template type? e.g. public partial class MyControl : UserControl should be: public partial class MyControl<MyData> : UserControl as I always get compile errors that MyControl than has no reference to InitializeComponents which is in the automatic generated pa...

Caching ASP.NET User Controls on the Client

Hi, I would like to know if it is possible to cache an ASP.NET UserControl on the Client. I have an User Control that queries a DB and renders a GridView. It must be on the Client because the query results vary from user to user (by the User.Identity.Name). The page is for an intranet. Any help would be really appreciated! Thanks in a...

There has to be a way to get my data bound at the correct time ...

Say aspx page called theParent has a DataGrid control named theDataGrid and a UserControl named theUserControl , and theUserControl has a button named theUcButton . Yes, I know, very imaginative naming. When theUcButton is clicked , a session variable is changed. This session variable is a select parameter for the datasour...