Optimize C# Code For Repeaters Using A Table?

Jan 6, 2010

on the aspx:

[code]....

The problem here is that instead of using Two repeaters, can we use only one?

We actually need the header to be separated from the contents using a different table row...

Edit: changed rptHeader's ItemTemplate's html element from <td> to <th> to be a little clearer.

View 4 Replies


Similar Messages:

Forms Data Controls :: Display Information In Table Using Repeaters

Jan 22, 2010

I am having trouble getting the following code to display side by side in a table. At the moment it displays next to each other in different cells but the cell on the right stretches further down than i would like, the opening item in the cell - <%#Eval("Product_ID") %> - is level with the end of the image in the cell on the left and everything else continues on new lines below it, when what i was hoping would happen would be for the product id to be directly across from the top of the image and the rest of the items to go below that. I have tried datalists and detailsview but they do not give me what i want either

[Code]....

View 1 Replies

Web Forms :: MasterPage Pop Up / Optimize That Resizing Code For Asp?

Nov 2, 2010

I have a master page(created for pop ups as i have a lot..) with the following code:

<body>
<div id = "weadas>
content content content..
<div>
<script type="text/javascript">
var content = document.getElementById("weadas");
window.resizeTo(content.offsetWidth + 50, content.offsetHeight + 50);
</script>
</body>

Wich i call with the following linkbutton:

lbnDictionary.Attributes.Add
(
"onclick",
"window.open('../ijSistema/ijPopUp/ppUpDictionary.aspx','mywindow','width=auto,height=auto,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no'); return false;"

but then it does not resize properly when poping up. It does work in IE6 but it does not in IE8 nor Mozilla 3.0.

Any ideas of how to optimize that resizing code for asp.net?

View 2 Replies

C# - Optimize Code - Linq And Foreach Loop 15k Records?

Sep 6, 2010

this is my code

[code]....

basically, the InstellingGegevens table gest filled in by some procedure from another server.
the thing i then need to do is check if there are new records in this table, and fill in the new ones in Instellingens.

this code runs for like 4 minutes on 15k records. how do I optimize it? or is the only way a Stored Procedure?

this code runs in a timer, running every 6h. IF a stored procedure is best, how to I use that in a timer?

[code]....

View 3 Replies

Web Forms :: Use Html To Create Table(<table></table>) In Code Behind C#?

Jan 13, 2010

how can i use html to create table(<table></table>) in code behind c#?

View 18 Replies

C# - How To Optimize AJAX

Jan 4, 2010

I have the following situation: excel-like application, that is accessible from internet.
2 users access it and I want the moment one user clicks on a cell, the other user to see that. (like in google documents).

My questions are:

Can I do this using standard UpdatePanel, while I keep the bandwidth usage to its minimum (in other words, only information for the current cell is passed, not the whole huge table), or should I implement my own ajax scripts on the page in order to get it optimized.How to do the updating : one way is to have a timer on the page and update it periodacally, the other way is to make a request and keep the connection opened till a change is made (using some heavy timeout, let's say 1 minute). Can you give me clues (like ajax libraries I can use, can I do this with the standard ajax controls in asp.net, ways to implement the live connection)?

View 1 Replies

Security :: How To Optimize The SqlRoleProvider

Nov 17, 2010

In my application

[code]....

is called on every page post back ,which fire query in db and bring 270 roles.

That can be optimized?

is it possible it called once at the time of login only.

View 3 Replies

How To Optimize The Tab Loading In JavaScript

Sep 8, 2010

My colleagues have create a website and there is a webpage which contains a Tab.

He Implement the tab with the following method:

1.Load all content of the page
2.Use javascript to display those group content as block and organize them into tabs.
3.when user click one tab, then acitve it, and hide all other tabs.

And these functions works very well, but the performance is bad:

1.Load all contents cost lots of time
2.It will show all content at first, and then shrink to a tab control. When the user see this, it might think this is a bug of our system.

View 1 Replies

How To Optimize Class For Viewstate

May 6, 2010

If I have an object I need to store in viewstate, what kinds of things can I do to optimize the size it takes to store the object? Obviously storing the least amount of data will take less space, but aside from that, are there ways to architect the class, properties, attrbutes etc, that will effect how large the serialized output is?

View 3 Replies

How To Make Common Footer For Repeaters

Mar 1, 2011

But I have multiple repeaters in my asp application I wonder how I can make some things common like footer..

And How can I create events for my repeater? Like a button in the footer who raise an Custom event?

View 2 Replies

ADO.NET :: Linq To SQL GroupBy With Nested Repeaters?

Sep 2, 2010

After a few hours of searching I couldn't find a solution to this issue so I figured I'd try a post. I have stored procedure that queries 3 tables and retuns 1 set of results. When I execute the sproc using the following code db.GET_TRAININGS(userID).GroupBy(s=>s.COURSE_TITLE); I get back an IGrouping container where the course title is the key and contains 2 GET_TRAINING_RESULT elements. Then I bind using rptCourses.DataSource=trainings; then databind(),etc.What I'm trying to do is have the parent repeater show the course titles and the nested repeater show the modules for that course for the particular logged in user. Basically trying to turn a flat piece of data into heirchical data.The stored procedure returns the following SQL Columns Course_Title, Module_Path, Module_Name,Sequence. The sproc code is below:

[Code]....

The repeaters look like this of course:

[Code]....

View 3 Replies

.net - SQL Databinding To Dropdown Lists In Repeaters C#?

Dec 14, 2010

I am trying to bind data into a dropdown list from c#. I am getting a Null error when trying to enter the data into the DDL's. I am using this code for the front end.

<asp:Repeater ID="RepeaterHardDrives" runat="server">
<HeaderTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%"> [code]...

and last but not least the function to setup the dynamic amount of DDL's looks like this

private void PreloadHardDriveRepeater(int intSupportedDrives)
{
int[] intArrDisks = new int[intSupportedDrives];[code]...

I am calling a list of populate functions in a !page.isPostBack if statement and the only one that is not getting the data is this one with the Drown Lists. It gets the number of Rows(18) from the database, but it it throwing a Null error(Object reference not set to an instance of an object.) I have seen quite a few people have been running into this error while googling the problem, however I could not find a solution that worked for me. The PreloadHardDriveRepeater function seems to work fine when run alone it loads the correct amount of DDL's onto the page.

View 1 Replies

100% CPU Usage In Xml/xslt Driven Web App - How To Optimize

Feb 25, 2010

The web app uses XML from a web service, which is then transformed to HTML using XSLT. The app uses a HttpModule to get the XML using AddOnPreRequestHandlerExecuteAsync.

Classes Used:

XmlDocument - stores the xml.
XslCompiledTransform - stores the transform, is cached in Application.
Asynchronous HttpWebRequest using BeginGetResponse/EndGetResponse
HttpModule with hooked AddOnPreRequestHandlerExecuteAsync events.

I do not want to use the XPathDocument unless there are no other possible optimizations. It would take some complicated code to get all the XML together without the ability to write to the XmlDocument. There is additional XML that does not come from the web service that must also be added to the document.

View 4 Replies

C# - How To Optimize The Records Coming In Gridview

Jan 8, 2010

I wanna bind atleast 30,000 records in a gridview from a sqlserver table. I want to bind only 50 records at a time with grid view. The grid has also paging and when I click next page then next 50 records should be shown and another next page's click another 50 records.

How can I optimize this thing. I want that If 30,000 records are binding then grid should be work as binded 50 records.

View 4 Replies

Is It Possible To Optimize WebForms To Perform As Fast As MVC?

Jul 13, 2010

There's so much hype about ASP.NET MVC these days, but the truth is that ASP.NET webforms is not going anywhere for some time. Is there any way for current developers to optimize ASP.NET webforms to perform as fast as ASP.NET MVC?

I have noticed a significant difference in speed between ASP.NET MVC and ASP.NET webforms. MVC is a lot snappier and loads pages faster than webforms. Can I achieve the same with ASP.NET webforms by optimizing it? If yes, what would you recommend?

View 6 Replies

C# - How To Optimize Spawning A New Process For Each Request

Mar 9, 2011

I have an asp.net mvc application that spawns a Process as follows:

Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(p_Exited);
p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
p.StartInfo.WorkingDirectory = dir;
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "pdflatex.exe";
p.StartInfo.LoadUserProfile = true;
p.Start();
p.WaitForExit();


Before going further, I need to know whether, e.g., pdflatex.exe is a managed code or a native code? Edit 1 I need to consider this because: (Hopely I am not wrong...) Each Asp.net application runs in an separate/isolated AppDomain as opposed to a separate/isolated process. A native executable cannot live in an AppDomain.to be continued.. Shortly speaking, I hope my site does not spawn a new process for each request. Because a process is more expensive than an application domain. Edit 2 My asp.net mvc application allows users to submit LaTeX input commands such as $ax^2+bx+c=0$ to be converted to a pdf file rendering an quadratic equation. Behind the scene, this web app will spawn a process executing pdflatex.exe. The job of pdflatex.exe is converting the LaTeX input commands to pdf document.

View 2 Replies

Web Application Startup Time - How To Optimize

Jul 7, 2010

we have this problem but can't find a solution. We have an application that references something like 24 dlls. When you invoke the application the very first time (after the application is for any reason reset) it takes 25-40 seconds to start loading contents.

This is what we tried:

1. precompile and publish everything in release mode
2. removing pdbs from bin folder
3. put strong named assemblies into GAC
4. set application to debug = false

consider that the whole bin folder is composed by 24 dlls for a total size of 28MB. Just 4 of these dlls are strong named and they are more and less 25MB. Nothing seems changed. What happens EXACTLY when the application is started is something I couldn't find in any book nor forum/blog/post... What can we monitor more to find where the problem is?

View 1 Replies

AJAX :: Use Collapsible Panels With Nested Repeaters?

Oct 8, 2010

I have a page that has 3 nested repeaters. For the first two repeaters, the repeater's ItemDataBound event binds the next lower repeater. This works fine for the data that I have, but causes a large amount of data to load all at once on Page_Load. Is it possible to use collapsible panels with nested repeaters in such a way that the data only loads when the user clicks a particular linkbutton?

View 3 Replies

Trying To Create A Simple Menu System Using Repeaters?

Oct 1, 2010

I am trying to create a simple menu system using repeaters. In the system I want to use a different formatting for class sub items and am trying to use an If that checks the DataBinders results and branches if its "Classes" but when I compile the code is says:

Name "Container" not declared.

On all the tutorials online and MSDN the Container.DataItem is just assumed to work so i can't find any information on it not working. Can anyone who uses databinders more than me explain this?

<asp:Repeater ID="TopNavRepeat" runat="server" DataSourceID="SqlDataSource1" >
<HeaderTemplate>
<ul id="nav">
</HeaderTemplate>
<ItemTemplate>
<li>
<asp:HiddenField ID="LinkIdField1" Value='<%# Eval("id") %>' runat="server"
OnDataBinding="LinkIdField_ValueChanged" OnValueChanged="LinkIdField_ValueChanged"/>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("Url") %>'
ToolTip='<%# Eval("Description") %>'>
</asp:HyperLink>
<ul>
<!-- -->
<% If (CStr(DataBinder.Eval(Container.DataItem, "Title")) = "Classes")THEN %>
<asp:Repeater ID="ClassDownList" runat="server" DataSourceID="ClassDS">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<li><asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("name") %>' NavigateUrl='<%# "/Class/" & helpers.urlSafe(CStr(Eval("name"))) %>'
ToolTip='<%# CStr(Eval("name")) & " home page" %>' /></li>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
<% Else %>
<asp:Repeater ID="DropDownList" runat="server" OnLoad="ChildDataList_Init">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<li><asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("Url") %>'
ToolTip='<%# Eval("Description") %>' /></li>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
<%End If %>
</ul>
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>

View 2 Replies

Forms Data Controls :: Two Repeaters And One Sqldatasource?

Mar 3, 2010

I have a table with articles. Every article has a column named category which value is either 1 or 2 On my landingpage the article headers are displayed as hyperlinks. All the articles with category 1 will be displayed in a repeater control on the left side of page and all the articles with category 2 will be displayed in another repeater control on right side of page. I know I can bind the repeaters to two different sqldatasource controls with different SELECT statements. But I wonder if I can do this by only using one sqldatasource control, and if this is better and proper way of doing it. If so, do I create a (datatable?) and do the sorting there?

View 5 Replies

AJAX :: Update Panels, Repeaters And Lists?

Jun 3, 2010

I realise that there are many posts on update panels and repeaters but none that quite solve my problem. I have a page with two Repeaters each inside seperate update panels. They sit next to each other one on the left and one on the right. The left repeater is filled from my database on my page load event. Im am storing the data in a List<> and then binding the list to the repeater. This works correctly and displays all my results. Each item in the left repeat has a button aswell. The button needs toremove the data from the left repeater and place it in the right repeater. I only want the database to be accessed in the Page_Load and then never again during the use of the page, until the data is saved (I have not got to this feature yet). So I have decided to use List<> objects.

View 6 Replies

Web Forms :: Pass Data Between Two Repeaters Placed In Two Pages?

Aug 13, 2010

I have one repeater control with check boxes in one of the page.My requirement is i have to pass the values of the row that i have checked (multiple check boxes can be selected at a time) when i click on a add button in the same page which is placed outside the repeater control.and, i want the details of the rows that i have selected to populate in another repeater control placed in a different page. how to do this using query string??

View 2 Replies

AJAX :: Loading AutoCompleteExtender Is Too Late / How To Optimize

Oct 21, 2010

I posted a question about using AutoCompleteExtender. It simply shows users all available email addresses when they type in a letter(prefix).

It works, but the problem is it loads to late :( takes around 5 seconds to pull out the list.

So I would like to optimize this

The part I would like to optimize speed is:

[Code]....

View 11 Replies

Silverlight - Optimize Loading An XAP File With A Website?

Jun 10, 2010

I've been developing a game using Silverlight 4 and silversprite (http://silversprite.codeplex.com/)

This game is HEAVILY content dependent, using a lot of audio and images. My content folder is around 90 mbs worth of stuff. And because of that, my XAP file is around 60 MB, and takes 5 minutes to download from the website before any user can start playing.

I am using Visual Web Developer 2010 to create my site and load the XAP. Is there a way where I can take content out of my XAP and put it in my ASP.net site project? Or perhaps upload my content files to the site's storage?

This would make my XAP file much quicker to download.

View 2 Replies

Log Slow Loading Pages / How To Optimize Speed

Jan 11, 2011

Do you know of a library/httpmodule for logging slow loading pages (perhaps for a specific treshold) in an ASP.NET environment?

Google did not yield any results.

It would not be too hard to implement on my own, but why re-invent the weel.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved