I have got 3 aspx page and a usercontrol on each page have an email placeholder in it. What I want to acheive is when the customer click on the usercontrol email placeholder, certain method on a particular page should trigger. See below for the code:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using Tangent.Breakingfree;
Also I have got another method on a different aspx page, I want to trigger that method when the client is on that page. The user control should trigger the right method depending on the page user is currently on.
I have created a usercontrol to capture education details, it contains 5 textboxes and an functionto insert that values into my db. I have added the usercontrol 5 times to a page. I have a button on my aspx page which I want to be able to click and call the function to insert the values.
i have user controls inherits from base user control like this:
How do i insert CustomerSendMail & UserSendMail into aspx page?
Note: The derived user controls having the same control layout as the base user control. Making copies of ascx page for CustomerSendMail & UserSendMail is not good idea, because if i modify the base's ascx page, the old CustomerSendMail & UserSendMail 's ascx page should be replace with the new one.
I have a problem with calling a method on a aspx page from a usercontrol.
The case is: I have 1 main page with 5 usercontrols, when something goes wrong in the code I want to display the error message in a Modalpopup Extender. I can create for each usercontrol a different modalpopup extender but isn't much easier when I make 1 popup in the aspx page. But the problem is: How should I call a method in the aspx page that open the popup?
I have search several hours on the internet but can't find anything useful.
Is it possible to do something like this inline in an ASPX page?
<%= Me.SomeExtensionMethod() %>
I can't seem to figure out how to get this to work properly. I'm receiving an error saying that "SomeExtensionMethod" is not a member of the current Page object. I've added the necessary <%@ Import Namespace="..." %> directive at the top of my page. This Does work in code-behind.This isn't vitally important, but it would be good to know how to do in the future.
I'm using ASP.NET with VB, and .NET version 3.5. In the project, I've got some utility functions that I call from expressions in the aspx pages and also in code behind. This all works fine on my local machine, but when I deploy to the production server, I get this compilation error on each of those utility methods:
BC30456: 'XXX' is not a member of 'String'.
where XXX is an extension method defined on System.String. I'm baffled about this for a number of reasons:
Why is ASP.NET compiling anything at all, since I've precompiled the application and put everything in the bin directory. ASP.NET knows the functions are there because they work in code behind. It's only when used in the aspx page that I have this problem. (e.g. if I do something like this: <%= "A string to XXX-ify".XXX())%>) This method is public, which I verified with Reflector. I imported the relevant namespaces in the web.config file, and I can see that these namespaces are being imported in the call that ASP.NET makes to the compiler.
I'm developing a web site, and i'm using infragistics for web, but I want to use in some pages silverlight controls (Infragistics too). Is there a way to access a silverlight control's properties and methods from an aspx page?
Senario: Masterpage with a UserControl and a child ASPX page
In the past when using this senario I've used an Interface as a way to pass a value from the UserControl (embedded in a master page) to the masterpage code behind then consume that value in the child aspx page.
My question is now that asp.net 4 have arrived is this still a good way to achieve this or is there another or perhaps better way to do it? I've read somewhere that perhaps "delegates" is perhaps another route to take.
I have two files in my project. One is user control (popup) customerpicker.ascx and one is default.aspx page. In customerpicker I have dynamically generated gridview and 'select' column with SelectButton.
What I want is this: When I click on 'select' on random row in gridview, then I like to display value from selected row immediately (like ajax) to aspx.page. How it is possible?
I have a page that dynamically inserts user controls into a placeholder depending on values in a database table. The user controls consist of a label and one control (dropdownlist, radiobuttonlist, or checkbox). The controls will also have the AutoPostBack property set programmitcally depending on values in the database. My update panel is on the main page, not in the user control. I have tried the ScriptManager.RegisterPostBackControl method to register the UserControl on page load, but the page still does a post back. I think I need to register the control that is inside the UserControl, but I have no idea how to access it from the main page_load event.
This thread is the closest to what I am trying to do, but since I am inserting the user controls programmatically, I need the triggers to be registered programmatically as well. Also, I need to register them as PostBackTrigger instead of AsyncPostBackTrigger because I need to do a full page reload because the user controls are inserted dynamically.
i have an button click event on the aspx page, the same aspx page load event i have hide the user control if the Session["Userid"] is empty, now the user can login from the same page, so after his successsfull login i show the usercontrol(in this user control i'm just show a Welcome message and logout button -in this user control also im checking if the userid is not found then hide the welcome message), but there is no data because while page load there is no data on session, so how to reload the usercontrol.
I have a UserControl that is on a masterpage... I have created the following property for the userControl in the codebehind:
Now I need to access this control and change that property from an aspx page that uses the masterpage with the control. I'm stuck I cannot seem to find the controls property. I can find the control and make it visible or not but I cannot find the property to modify control...