Forms Data Controls :: DataList Doesn't Load Some Of The Times?

Sep 13, 2010

This is the problem. My datalist, which connects to an Objectdatasource (I implemented custom paging) becomes populated with data only half of the time. When I go to the aspx page which contains that datalist (from another page), sometimes, the datalist fully loads, but sometimes only the header shows up. The header just contains hard-coded text whereas the body (itemtemplate portion) contains things that are binded to the objectdatasource. I thought I would mention this since the problem might have something to do with how things in bind.

The strange part of this is that when I was testing and debugging within VWD 2010, the datalist loaded fully everytime and I had no issues. When I placed my files on the IIS web server, this is when the problems started happening.What could the problem be? The speed of the IIS web server vs VWD's "internal server"? My page_load, init_load, etc methods are empty for this aspx page. The datalist is solely handled by the objectdatasource_selecting method. Should I explicit call something from one of those early lifecycle methods to ensure proper datalist loading?

View 5 Replies

Similar Messages:

Forms Data Controls :: Load The Same UserControl Multiple Times?

Jan 27, 2011

I have a simple UserControl that I've created that simply allows a user to enter the date. For the time being, it has a single Textbox with ID="tbDate". I am trying to dynamically add this control multiple times via (for example) `placeholder.Controls.Add(LoadControl())` but am receiving the error "An entry with the same key already exists". I could, perhaps, change the ID of the elements but then it would be difficult to grab the value entered by the user.

View 3 Replies

Forms Data Controls :: Error In GridView Binding - Page Does Not Load - Times Out / Hangs?

May 20, 2010

I have the following datagrid

<asp:GridView ID="importedListGridView" runat="server" OnDataBinding="importedListGridView_DataBind"
Width="450" CssClass="GridAltItem" AutoGenerateColumns="False">
<RowStyle CssClass="GridItem"></RowStyle>


View 2 Replies

Forms Data Controls :: OnItemCommand Doesn't Fire In DataList?

Feb 18, 2011

I have a DataList in an UpdatePanel. I'm using a PopupControlExtender for the UpdatePanel. On the DataList I have an OnItemCommand wich doesn't fire and I cann't figure out why.

My aspx code:


My OnItemCommand code:


View 1 Replies

Forms Data Controls :: Hyperlink Inside DataList Doesn't Grab ID?

Oct 28, 2010


I'm trying to put the wordID as part of the hyperlink and it's not outputting the ID.

View 3 Replies

Forms Data Controls :: User Control Event Doesn't Fire Within Datalist?

Dec 23, 2010

I have a datalist that loops thru cart items. Within the datalist template I call a user control that has a small form that gets repeated for each item. When this control is called outside of the datalist, the form submits fine, but when called within the datalist the button has no event action. I've tried adding an event handler to ItemDataBound of the datalist, but still no event action. How can I get my form to submit?

View 8 Replies

Forms Data Controls :: Paging Datalist - Display The Next Page Of Results Doesn't Do Anything

Feb 9, 2010

I have a datalist and want the results paged I have written a pager.ascx page and have an aspx and aspx.cs page to display the results. I have a stored procedure to pull the data out of the database and a class to talk between the stored procedure and presentation controls I have the pager being displayed when the results get over the limit I have set to 10 in the web.config file but when i click on the next link to display the next page of results it doesn't do anything. my aspx page is

<uc1:Pager ID="topPager" runat="server" Visible="False" />
<asp:DataList ID="newsList" runat="server" CssClass="List" align="center">
<ItemStyle CssClass="ItemList" />
<h2><%# Eval("Title") %></h2>
<p>Posted <%# Eval("Date") %></p>
<p><%# Eval("News").ToString().Replace("
", "<br />") %></p>
<uc1:Pager ID="bottomPager" runat="server" Visible="False" />
my aspx.cs page is
protected void Page_Load(object sender, EventArgs e)
// Retreive page from the query string
string page = Request.QueryString["Page"];
if (page == null) page = "1";
// How many pages of posts
int howManyPages = 1;
// pager links format
string firstPageUrl = "";
string pagerFormat = "";
//DataAccess.GetNews returns a DataTable object containing news data which is read into datalist
newsList.DataSource = DataAccess.GetNews(page, out howManyPages);
// Bind the data to the data source
// have the current page as interger
int currentPage = Int32.Parse(page);
// Display pager controls
topPager.Show(int.Parse(page), howManyPages, firstPageUrl, pagerFormat, false);
bottomPager.Show(int.Parse(page), howManyPages, firstPageUrl, pagerFormat, true);
my pager.ascx page is
<asp:Label ID="currentPagelabel" runat="server" />
<asp:Label ID="howManyPageLabel" runat="server" />
<asp:HyperLink ID="previousLink" runat="server">Previous</asp:HyperLink>
<asp:Repeater ID="pagesRepeater" runat="server">
<asp:HyperLink ID="hyperlink" runat="server" Text='<%# Eval("Page") %>' NavigateUrl='<%# Eval("Url") %>' />
<asp:HyperLink ID="nextLink" runat="server">Next</asp:HyperLink>
my pager.aspx.cs page is
using System;
// Simple struct that represents a (page number, url) association
public struct PageUrl
private string page;
private string url;
// Page property definition
public string Page
return page;
// Url property definition
public string Url
return url;
// Constructor
public PageUrl(string page, string url)
{ = page;
this.url = url;
// The pager control
public partial class UserControls_Pager : System.Web.UI.UserControl
protected void Page_Load(object sender, EventArgs e)
// Show the pager
public void Show(int currentPage, int howManyPages, string firstPageUrl, string pageUrlFormat, bool showPages)
// Display paging controls
if (howManyPages > 1)
// make the pager visable
this.Visible = true;
// Display the current page
currentPagelabel.Text = currentPage.ToString();
howManyPageLabel.Text = howManyPages.ToString();
// Create the Previous link
if (currentPage == 1)
previousLink.Enabled = false;
previousLink.NavigateUrl = (currentPage == 2) ? firstPageUrl : String.Format(pageUrlFormat, currentPage - 1);
// Create the Next link
if (currentPage == howManyPages)
nextLink.Enabled = false;
nextLink.NavigateUrl = String.Format(pageUrlFormat, currentPage + 1);
// Create the page links
if (showPages)
// The list of pages and their URLs as an array
PageUrl[] pages = new PageUrl[howManyPages];
// Generate (page, url) elements
pages[0] = new PageUrl("1", firstPageUrl);
for (int i = 2; i <= howManyPages; i++)
pages[i - 1] = new PageUrl(i.ToString(), String.Format(pageUrlFormat, i));
// Do not generate a link for current page
pages[currentPage - 1] = new PageUrl((currentPage).ToString(), "");
// Feed the pages to the repeater
pagesRepeater.DataSource = pages;
my class file is
// Retreive the list of news posts
public static DataTable GetNews(string pageNumber, out int howManyPages)
// Get a configured DbCommand object
DbCommand comm = GenericDataAccess.CreateCommand();
// Set the stored procedure name
comm.CommandText = "GetNews";
// create a new parameter for page number
DbParameter param = comm.CreateParameter();
param.ParameterName = "@PageNumber";
param.Value = pageNumber;
param.DbType = DbType.Int32;
// create a new parameter for products per page
param = comm.CreateParameter();
param.ParameterName = "@PostsPerPage";
param.Value = PlatiumMindProductionsConfiguration.PostsPerPage;
param.DbType = DbType.Int32;
param = comm.CreateParameter();
param.ParameterName = "@HowManyPosts";
param.Direction = ParameterDirection.Output;
param.DbType = DbType.Int32;
// Execute the stored procedure and saven the results in a DataTable
DataTable table = GenericDataAccess.ExecuteSelectCommand(comm);
// Calculate how many pages of posts and set the out parameter
int howManyPosts = Int32.Parse(comm.Parameters["@HowManyPosts"].Value.ToString());
howManyPages = (int)Math.Ceiling((double)howManyPosts / (double)PlatiumMindProductionsConfiguration.PostsPerPage);
// return the page of posts
return table;
my stored procedure is
(@PageNumber INT,
@PostsPerPage INT,
@HowManyPosts INT OUTPUT)
-- Declare a new table
(RowNumber INT,
Title NVARCHAR(50),
-- Populate the table with the complete list
NewsID, Title, Date, News
-- return the total number of posts
SELECT @HowManyPosts = COUNT(NewsID) FROM News
-- extract the request page of posts
SELECT NewsID, Title, DATE, News
FROM @News
WHERE RowNumber > (@PageNumber - 1) * @PostsPerPage
AND RowNumber <= @PageNumber * @PostsPerPage

View 1 Replies

Forms Data Controls :: Need To Load 5 Images When The The Datalist Loads Up?

Feb 14, 2010

I have a photogallery.But I need to load 5 images when the the datalist loads up.

View 3 Replies

Forms Data Controls :: Load A DataList Showing Error

Sep 3, 2010

i use the next datalist:


but show me this error:

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

View 3 Replies

Forms Data Controls :: How To Load User Control Data In A Datalist

Jan 6, 2010

I have the follow code (i just listed the parts that might be the more important to understand my problem):

(Code Behind)

(Page .ascx)

The user control RatingControl shows the rating and the number of rates, the user control Pager is responsible for raising CurrentPageChanged when the page changes and BindData() is a function
that binds data to the Datalist control.

When the page is loaded for the first time BindData() marked with ** is executed , thereafter i only want to load data when the event CurrenPageChanged raises.

So far so good, but the problem is when the CurrentPageChanged is raised and call the BindData() function, the user controls are not loaded properly, and things that i can't understand happen, like the user controls not receiving the properties initialized when they are loaded, but the other controls inside the Datalist like lblDescription are loaded correctly with their data.

Summarizing, the user controls are not loaded correctly in this particular case when the DataBind() is called by an event.

I already searched in the internet, and i read about page life cycle, user controls and i still didn't understand why this happens and how to fix it.

View 1 Replies

Forms Data Controls :: In Load User Controls Through Datalist?

Jan 2, 2011

I have 2 nested datalist that one of them is menudatalist and the other is submenu datalist. whenever I click on my submenu items a dynamic user control should load in dynamic tab. my problem is : one of my usercontrols that is JQGRID does not load in tab and when I click on that submenu Item an empty tab is created,however other user controls are loaded in tabs correctly.would somebody please help me to solve this problem?

View 2 Replies

Forms Data Controls :: Dropdown Doesn't Load With The Relevant Data When Select A Value From The First

Jun 10, 2010

I am experimenting with 3 dropdowns bound to 3 different datasources. I want the contents in each dropdown depending on what is selected from the above dropdown and the datasource queries reflect this.

<asp:DropDownList ID="DropDownList_CostCentres" runat="server" Height="16px"
Width="138px" DataSourceID="CostCentreDataSource" DataTextField="CostCentre"
<asp:SqlDataSource ID="CostCentreDataSource" runat="server"
ConnectionString="<%&#36; ConnectionStrings:corkABCConnectionString %>"
SelectCommand="SELECT [CostCentreID], [CostCentre] FROM [CostCentres]">
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="Manager:" Font-Bold="True"></asp:Label>
<br />
<asp:DropDownList ID="DropDownList_Managers" runat="server" Height="16px"
Width="138px" DataSourceID="ManagerDataSource" DataTextField="EmployeeName"
<asp:SqlDataSource ID="ManagerDataSource" runat="server"
ConnectionString="<%&#36; ConnectionStrings:corkABCConnectionString %>"
SelectCommand="SELECT [EmployeeID], [EmployeeName] FROM [Employees] WHERE ([CostCentre] = @CostCentre)">
<asp:ControlParameter ControlID="DropDownList_CostCentres" Name="CostCentre"
PropertyName="SelectedValue" Type="String" />

However, the second dropdown does not load with the relevant data when I select a value from the first dropdown (stays blank). Must I still provide an event handler and how do I combine this with the sqldatasource?

View 6 Replies

Forms Data Controls :: Set Default Values Of Items In A Datalist In Code Behind On Page Load?

Apr 14, 2010

I've got a few labels in a datalist that are being populated based on the values of a queryString but without the query string the datalist is empty.

How can I access the labels in the datalist and set a default value to them on the load of the page?

View 14 Replies

Data Controls :: Load DataList With Images On Scrolling Down Using JQuery?

Sep 20, 2015


the above link for Create GridView with TemplateField  and asp control for Load images while scrolling page down with above link code we can show only one image in one  row 

but datalist have ReaptColunm to set 3-4 according to ur need 

when i used above code for datalist its not working  .when scroll down  it bind duplicate value.

View 1 Replies

Data Controls :: JQuery Range Slider And Load Data When Page Is Scrolling Using DataList

Sep 20, 2015

I have read and referred your range slider and loading infinite images on scroll.The issue is when combining both the article the data is appending to old one.

View 1 Replies

Web Forms :: Login Page To Load 9 Times Each Time The Web App Is Called?

Feb 22, 2011

Using Forms authentication, for some reason my login page is called 9 times. it causes some browsers to show "too many redirects!". Even with no javascript and nothing in the page_load event, it is called 9 times.

View 2 Replies

Web Forms :: Master Page Load Event Firing Multiple Times

Jan 27, 2010

am using a master page, with children pages.

I am using forms authentication, and a session object to hold user information once the user is authenticated.

I am able to login and log out. I am able to log in and use the "remember me" functionality of the forms authentication.

When attempting to test the "remember me" functionality, the master page load event contains code to check the forms authentication & remember me, and retrieve user info from the database to automatically log the user in. This fires correctly, and the screens all load with the user successfuly logged in, and the users info is successfully stored in a session object.

Without touching anything on the screen, a moment passes and then the master page load event spontaneously fires again, Page.User.Identity.Name still contains the user name, however the session variable is now null, and throws an error.If I tell it to run past this error, it does, and the application continues to function normally, withthe session variables set correctly.

Its almost as if that second firing is ina different session, or something.

I have no problem posting code, but I have a profile class holding / handling the session communication, etc so it is a bit cumbersome.

View 3 Replies

Web Forms :: Make These As Alphabetical Also, Some Times Have To Load 1000 Records In A Page Which Is Difficult?

Feb 8, 2010

I have a data grid in which I have to display around 12,000 records. Even if I do paging it is difficult to display all the records. Is there any other control or something else so that I can display all these records. Even if I make these as alphabetical also, some times I have to load 1000 records in a page which is difficult.

View 2 Replies

Forms Data Controls :: DataList No Results / Access Datasource On The Page With A Datalist To Show The Data?

Nov 15, 2010

The problem is that i have a search page. Access Database holding the information. I have a Access Datasource on the page with a Datalist to show the data. I need to find a way on setting it up to says "Sorry no results found" when the is no results. i am unsure on how to do this though.

Below is my datasource and datalist


View 6 Replies

Forms Data Controls :: Radio Buttons Within Datalist / Group Just Not Via A Datalist With Unique Names

Mar 16, 2011

Am building a Form for out intranet that runs on ASP.NET and C#, it is to be a survey from a SQL database. I have the connections setup can pull informations/Questions from the database. I am having a problem with setting up radio buttons within a datalist, ive never done this and i know they require unque names.

It is to be 4 radio buttons per question where only one can be select, i know how to group just not via a datalist with unique names

View 6 Replies

Forms Data Controls :: Paging With Datalist If That Datalist Is Populated With Inputs Coming From A Querystring?

Jun 4, 2010

How can I do paging with datalist if that datalist is populated with inputs coming from a querystring?

View 3 Replies

Forms Data Controls :: Getting Selected Key Value From DataList Inside Another Datalist?

Aug 30, 2010

I need to find which Selected Key value that was selected in the ChildDatalist inside the MainDatalist

this is my Html code...for the MainDataList and the nested Childdatalist


View 3 Replies

Forms Data Controls :: Place A Datalist Inside Datalist?

Mar 14, 2011

I am trying to place a datalist inside datalist. I managed to place a datalist inside gridview but not datalist inside datalist.

Below is the code I am using to bind the datalist into the master gridview, I am trying to change this code in such way it will be right for datalist inside datalist but so far I did not succeed.


View 2 Replies

Forms Data Controls :: Datalist Style / Make A Datalist?

Aug 16, 2010

i have a datalist . that is contains 7 columns in repeat layout .when i have more from 7 columns , datalist style is normal .but when i have smaller than 7 columns ! data list style is not normal,

because there are some empty columns without specific schema.

How i can make a datalist > when i have 1 columns in my datalist my first layout width be 100% ;

and dont show some empty layout ?

View 2 Replies

How To Test Page And Function Load Times

Feb 14, 2010

I created a search page with a lot of different functions. The page takes about 6 seconds to load so I'd like to work on making it faster. I first want to see what functions are taking the most time. I originally tried adding Response.Write(Date.Now()) throughout the code but didn't yield accurate results. I'm guessing it that's because .NET doesn't compile things linearly?

View 2 Replies

Copyrights 2005-15, All rights reserved