How do I control one control from another control?
I have a page page1.aspx which is within a master page.
On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed.
Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all.
Is there a good article or someplace I can find some information on how to do this?
AllAboutFocus.com. Information Technolo...DNN: Switch from one page to another inside a module control
If one module have some control then i know how to switch from the inside of one control to another by keeping other area same. But if one control have more than one page, then I'm not finding any way to move from one page to another page, but still I will in the same control.
See below for more details:
I have one file Setup.ascx and another file Display.ascx.
So when user will click "Add"(some key) from top left corner of the module then "Setup.ascx" control will appear and when user will click one button from "Setup.ascx" page then this area will r...Dot Net Nuke (DNN)
/* Style Definitions */
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
font-family:"Times New Roman";
mso-b...want to call one c#.net function in one user control from another user control
i have two user controls
info.ascx and personal.ascx
i have a function like
in info.ascx i have a function like showdetails()
now i want to access this function from personal.ascx
can i do this ?
thanks in advance.
shwetaThanksshwetaIn a day when don't come across any problem -you can be sure that you are traveling in wrong path
you should better create a class where you will define the "functions" that you need in both files. declare "static" the function and call it like nameofclass.nameoffunction
In a web project you can...one module to control another module
I would like to have one module that controls another module. that is I want to have a list of things and then the user clicks on one of those things I want another module the image module or something that display an image with that thing.
I preferrabely would like to use the modules that come with dotnetnuke. Is there a way to accomplish this (to parameterize a module).
....and in the darkness bind them.
something like the link module but I do not want the navigation to the link to appear on a different page and i still want to have the links available.
Inter m...Updating a Label control in one user control from another user control
I have a main page in my music store site that has 5 user controls on it with 1 always showing main content and the others being things like a shopping cart, "best sellers", genre list etc (a la amazon). From the main content control I want to be able to set some label controls in my shopping basket control but I just can't seem to work out the syntax for how to do this:
Here's the code I'm using - I'm trying to go to the 4th user control on the page (my shopping basket) then find the appropraite label, cast it locally as a Label then update the value:
Label _so...DotNetNuke: How to view user control Module by giving control Key in module definition
I'm not viewing the usercontrol page when I'm giving Control key name in the module definition. but its shows if not giving control key name.I want to navigate from one user control page to another page module..I've written the coding as shown in below.. Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ControlKeyValue", "mid=" + ModuleId.ToString())); Its showing blank page when I'm executed...can anyone help me to solve this problem..?Thanks in advance..!Muthupandian ...Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null.
(67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected
UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems");
This is how we Load User controls into a content place holder.
UserCont...Slider control not rendering on DotNetNuke module control
Dear friendsI'm developing a website using DotNetNuke and asp.net and using a Slider control of the latest source there. I'm phacing a problem that its not rendering when I run the website. Here is a code: <ajaxToolkit:SliderExtender ID="SliderExtender1" runat="server" BehaviorID="Slider1"
BoundControlID="Slider1_BoundControl" Maximum="100" Minimum="-100" Steps="5"
<asp:Label ID="Slider1_BoundCont...Accordion ContentContainer ==> Add one control, goto another line, add another control, ...
I am trying to make an Ajax Accordion menu, and i am creating within a Content container Hyperlink(control) for each page in my site. The problem is that the links are being placed side by sided and i want them every one in each line inside a pane.Here is my code: 1 protected void Page_Load(object sender, EventArgs e)
3 Label lblContent = new Label();
4 Label lblHeader = new Label();
5 HyperLink link = new HyperLink();
6 //Pane Controle de Usuário
7 AjaxControlToolkit.AccordionPane aPane = n...Setting control values from one user control to another
I have two user controls on a page. Control 1 is view. Control2 is search. User selects value on Control2 and I want to update Control1(View). I cannot find syntax to change values on Control1 from Control2. The following is function on Control1 that is called from Control2 after pageInit and load on Control1. I have tried many many ways to findControl but all fail.
'Function on Control1 called from Control2 after Control1 PageInit/load:
Public Function loadForm...Update one user control from another user control
I have two user controls (.ascx files) on one .aspx page. They are in some kind of master-detail relationship. When I select a row in the GridView in first control, second control is populated with editable data. After changing data and clicking update data IS saved but GridView in first control is not updated.How can I cause that data in first control refreshes, but to keep selected row selected?__Please mark post as answer if it helps, if not come back and ask again!
Hi,You need to re-bind the GridView with the updated data source so that it reflects the latest changes. Regarding the cur...Controls.Add in Composite Control that inherits another control
I created a composite control that inherits from the WebControls.Button. I added the following in the Load event:
Dim mHidden As New WebControls.HiddenField Me.Controls.Add(mHidden)
but the control is not created. Why?Dimitris PapadimitriouSoftware Development Professional
Hi,Child controls on Button do not make much sense (how would you expect them to be rendered, doesn't button allow only text into value attribute?). Button allows child controls to be added, but they won't be rendered b...How can I update a control in one user control from another?
I have a page made up of numeruos user controls. In the first one (header.ascx) I have a literal control called "litPageTitle". However depending on what the user does in one of the other user controls (registration.ascx) I want to change the text in the page title literal.
eg://This code is in the second user control on the page (registration.ascx)
if (currentAction == "1")
ChangePageTitle("Terms and Conditions");
if (currentAction == "2")