Programmatically created instances of any server control
Questions tagged [dynamic-usercontrols]
79 questions
0
votes
1 answer
Javascript Function Inside Dynamically Added User Control Inside Update Panel Is Not Defined
I've got an ASP.NET Webforms page that is largely dynamically generated based on information received from a database. The controls get injected into an UpdatePanel. For the most part everything is working, except one control contains a javascript…

wsamon
- 31
- 2
0
votes
1 answer
ASP.net code behind generate web user control not passing values
I have a function that needs to load a custom webuser control, pass some values to it then take the HTML generated by this control.
I have the code:
string renderedControl;
{
var page = HttpContext.Current.Handler as Page;
var ctrl =…

Tom Gullen
- 61,249
- 84
- 283
- 456
0
votes
1 answer
Unable to see only some of my control when programmatically add to a div
So I am kinda stuck on trying to add multiple copies of my own usercontrol to the page according to DB data.
My user control can be shown if I add it directly into the aspx file, but just not when i try to add it programmatically in a loop on page…

Jacky Cheng
- 1,536
- 1
- 10
- 22
0
votes
2 answers
How to control that dynamically added usercontrol?
I have a code like this:
MyUserControl[] myControl = new MyUserControl[10];
when Form load:
for( int i = 0; i < 10; i++ )
{
myControl[i] = new MyUserControl();
myControl[i].label1.Text = "Title";
this.Controls.Add ( myControl[i]…

Brooklyn Smith
- 27
- 1
- 4
0
votes
1 answer
Getting Value for Dynamically Loaded User Control
I have a user control that is dynamically loaded by my page. The user control contains a number of multi-select listboxes and other controls.
Most of this works just fine. On postback, my list box controls are correctly populated (without me having…

Jonathan Wood
- 65,341
- 71
- 269
- 466
0
votes
1 answer
load multiple content placeholders with user controls from server side using C#
how to load multiple content placeholders with user controls from server side using C#..
currently from serverside(in page_load) i am loading one usercontrol like this:
ContentPlaceHolder cph = this.Master.FindControl("TopContentPlaceHolder") as…

karthik k
- 3,751
- 15
- 54
- 68
0
votes
1 answer
OnChange function for JQuery not firing
I am using JQuery 1.8.16. I have many user controls on the Page and wanna catch the edits for those if any. So, I am using Onchange event of JQuery in the Parent Page on which these User Control reside. Here's my JQuery code
$('input[type=text],…

Programmerzzz
- 1,237
- 21
- 48
0
votes
1 answer
Can REST-like URLs be passed/recognized in sharepoint 2010?
I know that REST can be used to query list data in SharePoint (even in SP 2010).
What I need, though, is a REST-like (not necessarily literally "canonical" REST) way to generate a Web Page.
Here is my scenario in more detail: I dynamically create…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
1 answer
Generating an entry form from a Dictionary
I'm building a plugin system and I want it to be as dynamic as possible - and such, I want a settings panel for it too. For this, I'd create the settings page from a Dictionary, where TKey defines the label of the parameter, and TValue defines the…

fonix232
- 2,132
- 6
- 39
- 69
0
votes
0 answers
Windows phone BackPressed event does not fire when I add PivotItem from code
I develop app with setting page include Pivot. On NavigatedTo method, load data from db async and add PivotItem.
BUT, BackPressed event does not fire for N times tap on back button (N = count of dynamic add PivotItem) and after it event call…

Hamid
- 1,099
- 3
- 22
- 37
0
votes
2 answers
dynamic user controls and viewstate - what am I missing
I'd like to add usercontrols to a PlaceHolder in my page dynamically at run-time, based on which DropDownList selection a user has chosen. Something like this:
protected void Page_Init(object sender, EventArgs e)
{
//get user's content…

mdelvecchio
- 567
- 1
- 5
- 25
0
votes
1 answer
Vb.Net Quiz Application Multiple Views
I am developing a quiz application in VB.Net . The UI is shown below.
The questions are generated randomly from a set of 500 questions and stored into an array. The questions are also stored in an arrray.
When the user clicks next another question…

Precious Okwu
- 397
- 5
- 12
0
votes
1 answer
adding user controls programatically to an updatepanel
In my asp.net application, I need to be able to dynamically add user controls based on data in a database.
For example, on page1, I will bind three elements to a repeater:
some html content
a user control
more html content.
The repeater on the…

WOPR
- 319
- 2
- 6
- 14
0
votes
1 answer
How can I dynamically access user control attributes?
Im trying to create a "user control menu" where links to a page's usercontrols are placed at the top of the page. This will allow me to put several usercontrols on a page and allow the user to jump to that section of the page without scrolling so…

rahkim
- 911
- 2
- 9
- 17
0
votes
1 answer
calculating total using angularjs and webforms usercontrol
Im new to using angularjs with webforms.
i am using asp.net 4.0 webforms project. It have a usercontrol(uc.ascx) with a textbox and I dynamically multiple of the usercontrols on a page(Default.aspx)..on this aspx page i have a text box which should…

kk0239
- 13
- 5