Questions tagged [dynamic-usercontrols]

Programmatically created instances of any server control

79 questions
1
vote
2 answers

dynamically load user controls using jquery ajax

I've read several articles on this issue, and technically speaking, all they end up doing is taking html code from a user control and injecting it into the containing page. I want a true user control to be loaded on to the page, so that on…
Riz
  • 6,486
  • 19
  • 66
  • 106
1
vote
1 answer

load usercontrol with jquery with handler

i want loading dynamically usercontrol with jquery. first i create this UserControl in root website : <%@ Control Language="C#" AutoEventWireup="true" CodeFile="UcProduct.ascx.cs" Inherits="UC_UcProduct" %>

Mohsen

after that i create .aspx…
Pouya
  • 1,908
  • 17
  • 56
  • 78
1
vote
2 answers

Dynamically Created User Control's Dropbox Items from Database resets on postback

First off, I have managed to create a web application where my dynamically created user controls are recreated and repopulated with the correct information upon postback. I am not sure what my problem is, but i hope that you will be able to help me…
Alen
  • 145
  • 1
  • 1
  • 10
1
vote
1 answer

user control inside another usercontrol inserted dynamicaly

I have a engine that build pages form me (must be) called engine.aspx. I just point a user control and the engine.aspx build for me everything that I need. But this time, I have to put another userControl inside the main user control. If I open the…
0
votes
1 answer

custom usercontrol content in UpdatePanel disappears on button click postback

I have the following function that updates the UpdatePanel content by adding/loading an ascx custom usercontrol in the placeholder that is in default.aspx: protected void NavigationTab_Click(string ascxpath) { …
0
votes
3 answers

Dynamically added javascript not evaluated in ascx control

I have an ascx control which has a literal placed on it during design time. At run time, in Page_Load, I set the literal's text property to a javascript that I retrieve from a database. However, it appears that the javascript code is not evaluated.…
laconicdev
  • 6,360
  • 11
  • 63
  • 89
0
votes
1 answer

I can't use my User Control Component in Windows Form

The 'MeButton' component could not be created. The error message is as follows: 'Microsoft.DotNet.DesignTools.Client.DesignToolsSeiverExcept ion: 'Ecommerce Desktop.Base.MeButton, Ecommerce Desktop.The type 'Admin, Version=1.0.0.0, Culture=neutral,…
0
votes
0 answers

Can I create some components with a dynamic name on c#?

I need to add some usercontrol in a form. But I should create it with a parametric name ex. control1, control2 ect... So to add the control I use this code: //MachineArea Is my usercontrol that i Need ti show in UI MachineArea machineArea1 = new…
0
votes
0 answers

Retrieve Project Controls virtual path

I work on C#. I have many controls in my asp.net project. I want to store my controls path in database. Suppose one of my control name is MyUserControl.ascx. and its path is ~/usercontrols/MyUserControl.ascx I want to store this path in database. I…
shamim
  • 6,640
  • 20
  • 85
  • 151
0
votes
2 answers

Call a usercontrol’s method from a form c#?

I have the method listviewupdate() in usercontrol schuler. Usercontrol schuler is in form1. Then I have form2. When I click a button in form2 I want to call the method listviewupdate(). I tried creating a second method in form1 which calls the…
Cicciopasticcio
  • 195
  • 1
  • 2
  • 8
0
votes
1 answer

Not able to access controls from Usercontrol called dynamically in child page

I am using below link for dynamically calling Usercontrols based on my conditions in aspx page. Link which i am using to dynamically load User-Controls Now the question is that, 1) I am creating the object of respective user control, to call the…
0
votes
1 answer

Unable to access data from controls (like textbox, checkbox, checkboxlist) which are loaded dynamically through an user control

Please find the scenario I'm trying to work on: I have an aspx page, whose content is loaded by dynamically loading various user controls. Each of these user controls has their set of controls like a textbox, checkboxlist or a checkbox. On click of…
Swetha
  • 11
  • 2
0
votes
1 answer

Dynamic select element in dynamic user control data loss

After a few days of searching forums, reading docs, and meeting with teammates I have yet to find a solution to this issue. I have a form in a VB.NET project that dynamically adds user controls with the postback from a click of an asp button. The…
0
votes
1 answer

How to change a UserControl from another UserControl and get back to the first one ( C# )?

C# WindowsFormsApplication So let's say we have 3 User Controls and 3 buttons . So i programed the Buttons to change the User Controls on Click_event . so what happens is that it changes the first User Control to the Second User Control and from the…
0
votes
2 answers

Dynamic User Control events not executing methods in C#

I am struggling to figure out why my User Control events are not executing. I have a dynamic UserControl, "MainMenu", within a dynamic UserControl, "MainControl". In MainMenu I have the following: public partial class MainMenu : UserControl { …
Peter
  • 33
  • 1
  • 4