Questions tagged [web-user-controls]
107 questions
3
votes
3 answers
How can I import a .ascx file into a .aspx page using tag registering?
I have this set up...
<%@ Register TagPrefix="UserControl"
TagName="UserLogin"
Src="~/admin/Authentication/Login.ascx" %>
<%@ Register TagPrefix="UserControl"
TagName="UserRegister"
…
Matt
3
votes
3 answers
Difference between User Control and Custom Control?
What are the differences between User Control and Custom Control in ASP.NET

Ramesh Soni
- 15,867
- 28
- 93
- 113
3
votes
1 answer
ASP.NET User Controls - Problem adding multiple instances programmatically?
I have created a user control which basically consists of 3 text boxes. I want to allow the user to click a hyperlink which will add a new instance of the user control onto a PlaceHolder. This seems to be working as I populate one of the text box…

James
- 80,725
- 18
- 167
- 237
3
votes
7 answers
Context is not a member of in asp.net usercontrol
I just created new usercontrol in an asp.net webapplication project.
Right after creation, the source looks like this:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SSR_Project.ascx.vb" Inherits="CS_SSR_RAIO.SSR_Project" %>
But as…

real_yggdrasil
- 1,213
- 4
- 14
- 27
3
votes
2 answers
What is the best way to split up MVC controller functionality?
When making Controllers, what are the best ways to split it up?
If I have an admin section that has a bunch of .ascx web user controls underneath it and a few .aspx pages. Should I have one AdminController? Or should I have a Controller for each…

Matt
- 5,249
- 12
- 40
- 45
2
votes
2 answers
Reference masterpage variables from control in child page?
Is it possible to access Masterpage variables from a web user control that is in a child page? I know you can access them in child pages by adding the following
<%@ MasterType VirtualPath="~/Master.master" %>
It doesn't seem to work when trying to…

chobo
- 31,561
- 38
- 123
- 191
2
votes
1 answer
Can I store a Web UserControl ascx and code behind in database and load it from there?
Is there any way I can store the code of the UserControl in a database table, compile it dynamically or Load it from there ? Means I get a string from database that contains the complete code of UserControl and then add it to the page ?

teenup
- 7,459
- 13
- 63
- 122
2
votes
0 answers
Web User Control Library in VS2010 & .net 4?
Is it possible to somehow load Web User Controls from another project / class library using Visual Atudio 2010 and ASP.NET 4.0?
I only found THIS (all the other are for VS2008 & ASP.NET 2.0 or older), but that doesn't work for me:
I can reference…

Christoph Fink
- 22,727
- 9
- 68
- 113
2
votes
2 answers
How to create redistributable user control in DLL form with embedded images, javascripts, style sheets?
I've developed a most reusable ASP.Net WebUserControl for our company's web applications. I'm now going to make it as a redistributable DLL according to this msdn topic. Since the WebUserControl comes with some JavaScript(s), CSS(s) as well as…

William X
- 6,751
- 6
- 31
- 50
2
votes
4 answers
Asp.net user control with inner controls
I need to develop a template-like user control, which would accept any arbitrary content, including other controls.
WmlCard.ascx
<%=…

tiago2014
- 3,392
- 1
- 21
- 28
2
votes
1 answer
Dynamic Ids in User Control to avoid duplication in JavaScript and Asp page
I have an ASP.Net user control, it has a text box and list box, I have given them unique ids and classes, as a user control if I drag it twice or more on asp.net page, it will not work because of same ids when compiled, please see the code below -
…

Muhammad Atif Agha
- 1,535
- 3
- 33
- 74
2
votes
1 answer
How to find controls on a dynamically created user control in ASP.NET?
I have to disable a link on dynamically created user control depending on condition.
How to find type of the control?
I am using a placeholder, hence trying to find the control like…

user2330678
- 2,221
- 14
- 43
- 67
2
votes
2 answers
Accessing inner value of ASP.NET Web User Control
Surprised that i havent been able to find this myself, but anyway. Let's say i use my web user control like this:
Some fancy text
How would i be able to access the text inside the tags from…

Fabian
- 13,603
- 6
- 31
- 53
2
votes
3 answers
do i need to unregister events in asp.net
I have a web user control that contains several other (web user) controls and subscribes to events the children raise.
I saw someone somewhere in a similar situation providing Dispose() on the containing control and unregistering the events it had…
aspdotnoob
2
votes
1 answer
Edit, Insert, Update mode for ASP.NET user control
I am looking for the best way to template a user control, so that when I specify a mode say readonly, edit, update, insert then the user control changes its mode correspondingly.
I have identified some methods and what I am looking for is a much…

Rohith Nair
- 1,080
- 1
- 17
- 33