Questions tagged [web-user-controls]
107 questions
24
votes
11 answers
Passing int array as parameter in web user control
I have an int array as a property of a Web User Control. I'd like to set that property inline if possible using the following syntax:
This will fail at runtime because it will be expecting an…

ern
- 1,522
- 13
- 19
17
votes
6 answers
When to enable/disable Viewstate
I generaly disable viewstate for my ASP.net controls unless I explicitly know I am going to require view state for them. I have found that this can significantly reduce the page size of the HTML generated.
Is this good practice? When should be…

Jon P
- 19,442
- 8
- 49
- 72
11
votes
9 answers
Dynamically added controls in Asp.Net
I'm trying to wrap my head around asp.net. I have a background as a long time php developer, but I'm now facing the task of learning asp.net and I'm having some trouble with it. It might very well be because I'm trying to force the framework into…

mlarsen
- 4,617
- 1
- 20
- 17
10
votes
4 answers
How to find the url of parent page of a User control
I have a user control where if a certain action is performed I want to redirect to the page the user was on with some additional query string parameters.
So, if UserControl.ascx was on Home.aspx, I want to redirect to Home.aspx?action=true, and if…

shashi
- 4,616
- 9
- 50
- 77
9
votes
1 answer
Web User Controls in different Project
I put some self made Web User Controls in a seperate Project "WebControls" and now want to reuse them from another Project
My Control consists of:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestControl.ascx.cs"…

Ephedra
- 831
- 10
- 24
8
votes
8 answers
When would you use a Web User Control over a Web Custom Control?
Can someone explain when to use each of these? They almost seem interchangeable in many cases.
The Custom Control gets added to the toolbar while the User Control (ascx) can not. The Custom Control does not get rendered in the Designer while the…

Mike
- 91
- 2
- 4
5
votes
2 answers
Registering .ascx ASP.NET User control in ASP.NET Page or Master Page will load it or not?
If I register user control in ASP.NET page, the control will be loaded to the page or not?
<%@ Register Src=".." TagName="tag" TagPrefix="pre" %>
even if I not call it in the page using?
because part of my code is…

Owidat
- 1,071
- 2
- 15
- 20
5
votes
2 answers
Add event delegate to event handler of ASP.NET user control
I have a web user control in asp.net - a keypad. It has buttons for all digits, a textbox for display of input and clear and submit buttons. The user control sits in AJAX update panel so it can be easily shown/hidden. (App is destined for tablet…

ArtK
- 1,157
- 5
- 17
- 31
5
votes
2 answers
User Control Static Name Option?
I know there is a way to force asp web user controls (ascx) to use static ID's so they don't get appended with all the appended naming garbage...but is there way to do the same for the"name" attribute? Specifically, in this case, for DDL's? JQuery…

John Kinane
- 366
- 2
- 8
- 17
4
votes
2 answers
How to create Java Custom Web Controls?
This question was originary in my head as "Can I use AWT controls in a Servlet?", which will show all my ignorance on the subject.
I am new to JAVA technologies but after a bit of reading, I seem to understand AWT controls directly hook up the OS…

JohnIdol
- 48,899
- 61
- 158
- 242
4
votes
1 answer
Integrating/switching to MVC3 from WebForms with large existing library of custom controls
Here's the situation. We're adding a new application to our suite of webapps based on WebForms and so I felt this would be the perfect time to introduce MVC.
I did all the research about intermingling the two and got the project all set up using…

Davy8
- 30,868
- 25
- 115
- 173
4
votes
1 answer
Updating a web user control based on another web user control
I have a web user control which has a Treeview control inside it. I have created another user control which contains a Gridview along with a couple of other controls.
The Gridview, should update itself whenever the user selects a different…

Kamyar
- 18,639
- 9
- 97
- 171
4
votes
3 answers
ASP.NET Web User Control with Javascript used multiple times on a page - How to make javascript functions point at the correct controls
I think I summed up the question in the title. Here is some further elaboration...
I have a web user control that is used in multiple places, sometimes more than once on a given page.
The web user control has a specific set of JavaScript functions…

Jason Summers
- 307
- 3
- 13
4
votes
2 answers
Regular Expression to disallow two consecutive white spaces in the middle of a string
I need a regex to meet the following requirements:
Only letters, periods and whitespace are allowed.
No white space at the beginning and at the end of the string.
White space in the middle of the string is OK, but not two consecutive white…

Afnan Ahmad
- 2,492
- 4
- 24
- 44
4
votes
2 answers
Web User Control Populate Items via XML
I have a web user control name as Chart Control, and I have a drop down List inside Chart Control
I want to populate DropDown List of Chart Control like this:
…

sm.abdullah
- 1,777
- 1
- 17
- 34