This doesn't execute the delimiter (its displayed verbatim in the confirm dialog). Why not? Also, that variable is set in the codebehind, but is ready by the time PreRender gets called, so I should be OK right?
<asp:LinkButton ... OnClientClick=
"return confirm('Are you sure you want to remove Contract
Period <%= Contract...
Does a custom control (ascx) get rendered regardless of whether visibility property is true or false.
It seems that when some controls have their visibility set to false, they do not get rendered, yet when I set an ascx control to be hidden from the aspx page that contains it, the code still runs through the ascx's codebind, despite it ...
Sorry if this is a basic question - I'm having some trouble making the mental transition to ASP.NET MVC from the page framework.
In the page framework, I often use ASCX files to create small, encapsulated chunks of functionality which get inclded in various places throughout a site. If I'm building a page and I need one of these contro...
I have been banging my head against this for a little while now. I just can't seem to get intellisense to work in a ascx user control, but it works fine in a plain old aspx.
Here is a sample aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestScriptLoader._Default" %>
<!DOCTYPE html PUBL...
I have an ascx control bound to a datasource with frequently changing data. Is there a quick way to have an ascx control postback, rebind and refresh itself every X seconds. The ascx control is in an update panel.
...
I am trying to implement a custom control using a RowClickableGridView class provided on this Stack Overflow post. This is the first time I have tried to create a custom server control and followed steps laid out in this MSDN walkthrough.
I have the RowClickableGridView class in the App\_Code directory of my Web Application Project with...
What is the "best practice" for designing ascx user controls regarding separating the UI from the Data Access? Should my user control use 3 tier archetecture as in my projects or can I do the data acess from within the user control?
...
I can't really say I fully understand hopw they interact.
Especially when I say if(Page.IsPostBack) in an ASCX Load event, what does it mean. The parent ASPX is postback?
thanks in advance
...
Hello All,
I currently have a dropdown inside an ascx control. I need to "find" it from within the code behind on another ascx that is on the same page. It's value is used as a param to an ObjectDataSource on ascx #2. I am currently using this ugly piece of code. It works but I realize if the conrtol order were to change or various othe...
Hi All,
I'm fairly new to SharePoint so apologies in advance for sounding like a 'Newbie'.
I have created a simple Webpart, which uses a Web User Control - [.ascx file] to provide all the controls for the Webpart. On the .ascx file, there is a DropDownList which is hard-coded at the moment and works well in the Webpart (within a ShareP...
This is my layout template (ascx without code behind)
<%@ Control Language="C#" AutoEventWireup="true" Inherits="ws.helpers.LayoutUC" %>
<div>blah blah blah</div>
<ws:Panel runat="server" ID="left"></ws:Panel>
<ws:Panel runat="server" ID="main"></ws:Panel>
<ws:Panel runat="server" ID="right"></ws:Panel>
Modules will be added into ws:P...
i've tried to get an asp.net dropdownlist control to become a dijit combobox but it's not working.
i've tried this:
<asp:DropDownList ID="ddlUserID" dojoType="dijit.form.ComboBox" runat="server"
DataTextField="FullNameAndUserName"
CssClass="stdtext" DataValueField="UserID" AppendDataBoundItems="True"
AutoPostBack="True"
...
Suppose I have a user control MyControl.ascx, and I put it in the Default.aspx like this:
<uc1:MyControl id="MyControl" runat="server">
Now in the code-behind of Default.aspx I do this:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
MyControl.Visible = false;
}
The problem is that even I do not render MyContr...
Hello!
I'm developing an ASP.NET application and I'm trying to do the following:
I'm going to have only one ASPX page splitted into two columns. On the left column is going to be a TreeView, and on the right column is going to be something to edit treeview's nodes.
When the user can select a treeview's node to edit on the right column...
What would be the best way to implement visual inheritance for partial ascx views in MVC?
I have the main Site.Master file which provides a header, footer, sidebar and main content area. Then i have an Info.Master which uses Site.Master as it's master page and which provides a common layout for almost identical pages. Then all these sim...
I have a ListView that includes an EditItemTemplate and an InsertItemTemplate. The two forms share almost all of their markup. For example:
<asp:listview runat="server" ... >
<layouttemplate>...</layouttemplate>
<itemtemplate>
<p><%#Eval("Name")%></p>
<p><%#Eval("Title")%></p>
...
</itemtemplate>
<insertit...
Hello.
I'm developing an ASP.NET application with C# and Ajax.
I have a page that holds user controls loaded dynamically. I need to pass some data (integer values and some strings) to the user control that has been loaded dynamically.
Now I use Session to pass these values, but I think I can use another way; something like VIEWSTATE o...
I am developing a number of modules for a client that will share some user interface functionality using a common Web User Control to provide the UI. When I wrote the first module and added in the .ascx file, all was fine. When I add the same control to the second module, I get the following error:
DotNetNuke.Services.Exceptions.Modu...
Hello,
I'm currently converting a set of .aspx pages and the VB code behind them to .ascx and C#.
I'm most of the way through the project now but have become a bit stuck as I'm fairly new to ASP.net.
Basically the system I'm working with validates a shopping basket but with me changing the class the code inherits from I'm having issue...
Hi everyone,
You've probably noticed that when you debug an error which comes from an ASPX or ASCX file (literally, not from a corresponding code-behind file), ASP.NET displays an error page showing you the source file and the line on which the error occurs. The source file being displayed is automatically generated from parsing the pag...