In my Page_Load event of codebehind file, I am loading data in to a datatable.In my .aspx page I am having some inline coding,I want to display some data from this datatable.But when i am running the program,It is showing an error like "Error 64 Use of unassigned local variable 'dtblChild' "
dtblChild is my DataTable Object
Is Page_Loa...
I understand that you can now create MVC-specific user controls, but will my existing standard ASCX user controls work in an MVC view?
I understand that MVC pages have a completely different lifecycle but will, for example, a Page_Load method be invoked as normal when the control is sitting in a view?
...
I have an asp.net web page with a ton of code that is handled in the Page-Load event of the page. I also have a dropdown box on the page that should reload the page with a new value, but I would like to get this new value before I process the entire Page-Load code.
I am trying to get my head around ASP.NET page lifecycle.
Should I mov...
Hey everyone,
I'm new to stack-overflow and programming so forgive me for any awkward phrasing!
I am building a side-scrolling website which is graphic-rich, and 680x9400px in size. I will be using some javascript and/or mootools to create a cool side-scrolling effect, similar to http://sursly.com.
I am web optimizing all the images ...
Hi,
I've been thrown into an ASP.NET project and I've got a page which contains a control that is fetched via AJAX.
The Page_Load function of the control does a little bit of logic necessary to get the correct values from the Query string.
The problem is that the Page_Load function isn't called in IE.
If I put a breakpoint in, I can ...
When creating a new WebForm, Visual Studios creates a Page_Load handler in the code behind as a default, which is cool. So for years, I have always put code for doing things like set properties of controls in Page_Load. Recently, I used Reflector to look at some assemblies written by Microsoft and saw that they have put the same type o...
I have a SharePoint site that I have added a few extra pages to in order to handle some custom AJAX requests.
Every now and then, about once a week, I get a call saying it's not working. When I look into it, the error I'm receiving is:
Could not load type 'My_Controls.Control_Name' .
Where My_Controls.Control_Name is the name of the...
I'm making an ASP.NET Web page that generates pages from SQL when they're not cached. Their loading time could be between 300ms to 1.5seconds (No fix you database replies please).
I personally find these values to be too long, and was looking for a solution that allows me to inform the user that the page he is visiting will require a bi...
Duplicate: Multiple javascript/css files: best practices?
Hi guys, my application is almost done but the thing is that I've noticed that I'm including a lot of external javascript files and css. I'm using a lot of third party free plugins here and didnt want to touch the code for fear of messing something up.
But the result is that I n...
I'm executing an external script, using a <script> inside <head>.
Now since the script executes before the page has loaded, I can't access the <body>, among other things. I'd like to execute some JavaScript after the document has been "loaded" (HTML fully downloaded and in-RAM). Are there any events that I can hook onto when my script e...
Hey,
Topic says it. Short version: I need a way to force a refresh of the page on First page-load only. Would be easy in asp.net, but I've no idea how to go about this in classic asp.
Longer version: I'm trying to update a rather large application, and one of its problems is that when you log in, it doesn't yet store the necessary info...
I am building an ASP.NET site using Visual Studio 2008 and have a page looking like this (stuff snipped)
<asp:Content ID="Content2" ContentPlaceHolderID="PageContentPlaceHolder" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
the page here..
</...
In asp.net, when do you bind your gridviews? at Page Load() or Page Init()....why?
...
I have a page that uses jQuery UI, and calls the datepicker on 2 different text boxes. Without the calls, ie. just loading the page without attaching any datepickers, the page loads in 1.20 seconds. With the datepickers attached, the page loads in 3.92 seconds. (this is in firefox)
How can I get this speed up? Based on the network graph...
Hi All,
I am having a strange problem. Here is the scenario
Here are my files:
Project1.aspx
Project2.aspx
They are set up the exact same, including their Page_Load functions:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If (Not Page.IsPostBack) Then
setPrevIndex(-1)
...
End I...
My question is fairly simple. This is what I have for the aspx page:
<ul>
<asp:Repeater runat="server" ID="linksList" OnItemDataBound="linksList_OnItemDataBound" >
<ItemTemplate>
<li><asp:HyperLink runat="server" ID="link" /></li>
</ItemTemplate>
</asp:Repeater>
</ul>
I'm trying to get a list of hyperlinks from...
I have a page with textboxes and buttons. When the page loads, often times, focus is in one of the textboxes and I don't want this to happen. However, I don't want to use something like setfocus in the page load event because then when buttons are clicked the page will jump. How do prevent the textboxes or any controls for that matter of...
This is driving me crazy.
I have a very simple user control:
public int? ImageId {set; get;}
protected void Page_Load(object sender, EventArgs e)
{
... do something with ImageId...
}
And then I put this control on the page with ListView within UpdatePanel:
<asp:ListView ID="ListViewImages" runat="server" DataSourceID="src">
...
Hey all! I'm loading a UserControl through a Web Method, and using the LoadControl functionality as such:
// create page, stringWriter
Page _page = new Page();
StringWriter _writer = new StringWriter();
// get popup control
Controls_Popup_ForumThreadForm _control = _page.LoadControl("~/Controls/Popup_ForumThreadForm.as...
I am using C#, .NET 3.5. I have a GridView control with dynamically bound DataSource and I set the PageSize dynamically in the Page_Load event handler. I have set AllowPaging = true on the control.
The GridView paging is working fine, however the pagesize set in Page_Load does not take effect the first time that the page is loaded. The ...