Efficiency - NamingContainer Naming Convention?

Mar 1, 2011

I'm working on a project in which the client has required a lot of things to happen on a single page, and this has resulted in a rather large blob of HTML being rendered out to the client browser.

The main issue is with input tags (where runat="server" attribute is set), these tend to cause a drastic increase in markup size due to validation, updatepanel triggers, viewstate, and the control markup itself. I've done what I can to reduce the amount of triggers I'm using, I'm compressing the viewstate (to something like 8% of the original viewstate size), I've gotten rid of a lot of ASP.NET Validators and rolled my own, and and I've been using ClientIdMode to reduce the length of the ID attributes of many asp.net elements. All of these combined significantly reduces the amount of HTML being sent to the client, (for example going from 2 megabytes for a request down to 500-600 kb - these are HUGE pages, mind you).

[Code]....

View 2 Replies


Similar Messages:

Loop Through Controls That Follow A Naming Convention?

Jan 12, 2011

I have ten textboxes (txtCO1, txtCO2... txtCO10).I need to set them all to the same text (blank). How can I use a for loop that just changes the number after txtCO, isntead of explicitly setting each text box's text property to ""?

View 6 Replies

VS 2008 - Naming Convention For Files And Folders

Oct 24, 2014

Is there a recommended naming convention for files and folders in ASP.NET? So far, I've found this thread on the native ASP.NET forum. But it doesn't sound very useful. Some people say "meh, naming convention is not that important", others reply "no, naming conventions are important" but don't say what the recommended convention for ASP.NET actually is.I can use standard VB notation for variables and method names inside the files.

View 2 Replies

Finding Best Naming Convention For A User Control " E.g. Id="LblUserName", Id="LabelUserName", Or Id="UserNameLabel"

Mar 21, 2011

what is the best way to call my controls?

LblUserName or LabelUserName or UserNameLabel

View 4 Replies

CheckBox Null By Finding It From The Namingcontainer From A Datalistitem?

Mar 9, 2010

I've got a datalist, with some checkboxes in it.But if i press a button, he runs trough the datalist, and checks if there are checkboxes checked.But all checkboxes are null, so there is something wrong, but what?My code:

<asp:DataList ID="DatalistSearch" runat="server" RepeatColumns="1"
onitemcommand="DatalistRelatedProducts_ItemCommand"
onitemdatabound="DatalistRelatedProducts_ItemDataBound">

[code]...

View 3 Replies

Custom Server Controls :: DropDownList As NamingContainer?

Feb 3, 2011

'm trying to add validation support to DropDownList by creating a custom control inheriting from DropDownList.To avoid naming conflicts my dropDownList implements INamingContainer. Unfortunately when I try using this control I get the following exception:Unable to find control id 'MDD' referenced by the 'ControlToValidate' property of 'MDD_Validator'This is my control:

[Code]....

I found out that excecption occurs because for INamingContainer FindControl(NamingContainerId) returns null, therefore validator cannot find dropdown.When I remove INamingContainer implementation everything works fine, but then ID given to the validator is not associated with that of DropDown.I know I can manually set validator ID to have DropDown.ID + "_" as a prefix, but is there any way to accomplish this using INamingContainer ?

View 3 Replies

Practical Application Of Convention Vs Configuration

Apr 18, 2010

but here's a case in point that I'd like to share and get input on. Below are two entities, coded like normal.

Csharp Code:
using System.Collections.Generic;using SharpArch.Core.DomainModel;namespace Venue.Core{public class Category : Entity{private virtual IList<Forum> forums = new List<Forum>();public virtual int Sequence { get; set; }public virtual string Title { get; protected set; }public virtual string Description { get; set; }public virtual bool Enabled { get; set; }public virtual bool Visible { get; set; }public virtual IEnumerable<Forum> Forums { get { return forums; } }public void AddForum(Forum entity) { forums.Add(entity); }public void RemoveForum(Forum entity) { forums.Remove(entity); }public Category(string title){Title = title;}}}
[code]...

View 10 Replies

C# - Improve Efficiency Of GridView Or DetailsView?

Jul 29, 2010

In ASP.net when we perform paging over Gridview or DetailsView than the Gridview fetch all rows from the Database each time.

Suppose our Database contains 100 rows and we have configured Paging in Gridview with page size of 10 records per page.But whenever we click on the the pager control of gridview for any particular page no. then GridView should fetch only particular 10 rows from database.

If we click on page no 3 then it should query only rows 21-30 but it fetches all rows and neglect the remaining .which is simply a wastage of resources.

View 3 Replies

Changing The CreatedBy Convention In Subsonic (3x)?

Mar 7, 2011

I'm working against a database that wasn't designed by me and in all the tables there is a CreatedBy field that is an int. Now when I generate against this db i get all kinds of errors because subsonic is expecting that field to be a varchar.I don't particularly want to go and rename the field in all of these tables so I was hoping there was a way to "alter" or change the internal convention (without getting into the source) in subsonic.Has anyone been able/done this in subsonic 3.0.4??EDIT: I'm using the active record model in subsonic 3

View 1 Replies

How To Improve Efficiency Of DetailsView Or GridView In .NET Page

Aug 11, 2010

In ASP.net when we perform paging over Gridview or DetailsView than the Gridview fetch all rows from the Database each time.Suppose our Database contains 100 rows and we have configured Paging in Gridview with page size of 10 records per page.But whenever we click on the the pager control of gridview for any particular page no. then GridView should fetch only particular 10 row

View 3 Replies

FluentNHibernate Convention/:Could Not Find A Setter For Property Children

Jul 25, 2010

Here's mt entity:
Csharp Code:
using System;using System.Collections.Generic;using System.Linq;namespace Venue.Domain{ using Venue.Infrastructure.Domain; public class Forum : Entity { private IList<Forum> children = new List<Forum>(); private IList<Moderator> moderators = new

[code]....

Here's my class map:

Csharp Code:
using FluentNHibernate.Mapping;namespace Venue.Persistence.Mapping{ using Venue.Domain; public class ForumMap : ClassMap<Forum> { public ForumMap() { Id(x => x.Id); Map(x => x.Sequence); Map(x => x.Title);

[code]....

And here's my convention:

Csharp Code:
using FluentNHibernate.Conventions;using FluentNHibernate.Conventions.Instances;namespace Venue.Persistence.Mapping.Conventions{ public class ReferenceConvention : IReferenceConvention { public void Apply(IManyToOneInstance instance) { instance.Column(instance.Property.Name + "Id"); } }}

I get the following message:Could not find a setter for property Children ...

View 2 Replies

Directive Convention For Declaring Client-Side Includes?

Mar 10, 2011

I am loading .aspx and .ascx files as StreamReader.

I want each file to register it's javascript and stylesheet dependencies in some declaration like a <%@ ClientDependency path="~/Scripts/jquery-1.4.1.min.js" %>.

Is there an existing convention for doing such a thing? I don't need an implementation, but I don't want to create a new syntax if there is already a way to do it.

Also, what are the guidelines for custom <%@ blocks in ASP.NET?

View 3 Replies

Web Forms :: Website Search Efficiency For Large Data Sets?

Sep 28, 2010

The website I am working on has a section where users can search for content they have digitally subscribed to. way to cross-check both data sets, the first being content that matches the search criteria, the second being the content the user has subscribed to. What's making this is a mess is how the data is structured. Here is an example...

We store all of our content in a "Content" table in our database. A piece of content, a "journal", for example, and all of its child records (volumes, issues, and articles) are all stored as records in the "Content" table, each with a ParentId of its corresponding parent record. So, A journal can have n volumes. Each volume can have n issues. Each issue can have n articles. A user can have a subscription to any of these, which would implicitly give them access to all child records. For example, if a user was subscribed to a journal, they would have access to all of its volumes, issues, and articles. If the user was subscribed to an issue, they would have access to all of its articles, but not the parent volume or journal.

Some users own over 30,000 records, and we have over 100,000 content records in the database. The Content table has relationships with several other tables that are used for the search. This leaves me with an expensive query to find what the user has access to, and another expensive query to search through all of the records to find search criteria matches. Some of our searches take 20-30 seconds and I would like to speed it up to a max of 5sec per search.

I tried running a query to get the ContentIds of everything the user owned when they first visited the search page, and then caching it to eliminate further database hits, but when I passed the list of ints into the query via a linq .Contains statement, I hit the SQL parameter limit of 2100, since apparently .Contains() splits them all out.

View 3 Replies

Forms Data Controls :: Paged Sortable Lists And Efficiency?

Jan 13, 2010

I need to make a large Ebay-style list of listings (think of the page that comes up when you search for something in Ebay, with a photo, title, one-line description, price, that's paged, and sortable). My limited experience with DataGrids in the past always resulted in what felt like a sluggish page to me, but I'm not sure if it would have been faster if I had pieced it together with a data reader instead.So I'm wondering before I even get started, what is the fastest / most efficient way to retrieve and manage this data.Is it more efficient at runtime to use a DataGrid, or to write the paging and sorting in more manually and use a DataReader, or another way?Ebay manages to get thousands of listings to display very quickly, but they've obviously got a lot of manpower to squeeze every last bit of performance they can out of the site, and good high-powered servers.

View 5 Replies

Architecture :: Read And Analyze A Very Large Log File With High Efficiency And Performance?

Sep 13, 2010

It is a very large .txt file (more than 3M), and produced everyday, the content is user's system log like below:

2007-11-01 18:20:42,983 [4520] INFO GetXXX() SERVICE START
2007-11-01 18:21:42,983 [4520] WARING USER ACCESS DENIED
2007-11-01 18:22:42,983 [4520] ERROR INPUT PARAMETER IS NULL CAN NOT CONVERT TO INT32
2007-11-01 18:23:59,968 [4520] INFO USER LOGOUT

View 14 Replies

MVC :: DisplayTemplate And EditorTemplate Naming?

Feb 23, 2010

I've got a couple of questions about the naming convention for the DisplayTemplates and EditorTemplates in MVC 2.

If for example I have a customer object with a child list of account how do I:

Create a display template for the list of accounts, what is the file called?When I'm doing a foreach( var c in Model.Accounts ) how do I call a display temple while in the foreach? When I do Html.DisplayFor( x => x ) x is the model and not in this case "c".

View 1 Replies

Naming Conventions For Controls

Mar 15, 2010

There is a conflict b/w our team members about following the naming conventions. We have downloaded a document that specifies the naming conventions for the ASP.NET controls. But it does not covers all ASP.NET 2.0 controls, so there is basically a fight
over the naming conventions of the controls that are not specified in that document. Take for example : GridView Control, the naming convention for this control is not defined in the document, so I suggested 'gvw' for the prefix name but my team mates are
suggetsing 'gv' for that purpose. I had somewhere read before that the naming convention should contain either three or four letters of a control like TextBox can have 'txt' and ImageButton can have 'ibtn' as the identifying name as prefix.

View 3 Replies

C# - Naming Conventions For Controls?

Jan 2, 2011

While working with VS by default the editor generates this:

<asp:Button ID="Button1" runat="server" Text="Button" />

Now the ID generated is Button1 i.e First letter capital. My questions is what is the best way to name the controls ?

SubmitButton
btnSubmit

or something else?

Which naming convention is considered good ?

View 4 Replies

C# - DAL And BLL Naming Conventions Other Peoples Alternatives?

Jul 12, 2010

peoples naming conventions for DAL and BLL if there were any better names for them than those ones.

View 2 Replies

Web Forms :: ObjectDataSource Does Not Have A Naming Container Error

Apr 21, 2010

I have done my searching and haven't found anything related to my issue. I have an aspx page that contains a regular drop down control. When the selectedIndex is changed, it fires off a post back and also rebinds a datalist based on its value. Inside the datalist I have an ascx control which has a gridview and an object datasource:

ASPX page:

[Code]....

My problem is that after my drop down posts back, when the process gets to DataList1.databind (in the selected index changed) i get a "The ObjectDataSource control 'ObjectDataSource1b' does not have a naming container. Ensure that the control is added to the page before calling DataBind." error.

During the post back, the pageload on my control runs and all my properties seem to have its values.

View 5 Replies

Installation :: Strong Naming An Assembly Of A Website?

Jan 24, 2010

Strong Named Their Assembly. I've read on-line and in the help files for 6 hours straight and I am no where closer to getting this. It seems that every 6 months I run up against one of these types of things with VB.net and the .Net Framework. I read on line and find dozens of people who get the same exact error. Most of the threads are never resolved and the ones that seem to resolve the issue do it in a way that doesn't work for ever one else. It is really absurd.

My web site runs fine in debug mode on my computer (local host). It loads in FireFox and runs fine. When I post it to my web site I get the error below. I try to "Strong Name The Assembly" with the command line command "aspnet_compiler -v default.aspx X:NetProjectsHumMPI -keyfile X:NetProjectsHumMPIkeypair.snk -aptca"

Default.aspx is what fails. This should be the virtual folder of my web app. Obviously "Default.aspx" is not right. I have tried 42 variations on what I think the virtual path to my web app might be. Every single time the compiler fails telling me that it is not a valid path.

I'm moving in to week two of trying to get a simple "Hello world" web app to load on my web site. It runs perfect on my development machine but generates constant errors on the web site. Each time I fix a problem that only happens on the web site another one crops up with even the slightest change - or sometimes even NO change to the code.

View 5 Replies

Getting The Error In Naming The Sql Server Database Table?

Nov 17, 2010

I am creating a sql server database table and when i save the table and give the name to a table "i.e. USER" and then see in the property of that table then the name changes to "[USER]". I have tried lot of time but every time it gets.Plz help mei am also attaching the screen shot of this.

View 4 Replies

VS 2010 - Naming Controllers In MVC / Singular Or Plural?

Apr 21, 2012

I'm struggling a bit with how to properly name the controllers in MVC. Should they be singular or plural? For example, lets say I have the tables Customer and Product in my database. Should the controllers be CustomerController and ProductController, or CustomersController and ProductsController?

Put a different way, does it make more since for the URL to be:

somedomain.com/Product
somedomain.com/Product/Edit/1
or
somedomain.com/Products
somedomain.com/Products/Edit/1

View 2 Replies

MVC :: How To Remove The Controller Postfix Dependency In Naming Controllers

Aug 28, 2010

In the Controllers directory, naming every controller with "Controller" prefix seems plain stupid. Is there a way to remove this dependency?

View 5 Replies

MVC :: How To Encapsulate Logic In Ascx Partial View With The Same Efficiency Of Webforms Ascx

Aug 10, 2010

I have to build a few ascx partial views in my MVC applications to encapsulate re-usable functionalities as well as archive SOR and SOC. However, I encountered challenge how to encapsulate the business logic that drives MVC ascx views.In webforms, the code behind of an ASCX control can handle a button click event and browser still shows the same page with only one postback. How can I archive the same thing in MVC? When ~/Address/Edit/2 includes an ascx partial view with a button on it that calls another MVC action - let's say ~/ShareController/CommonAction - what is the best way for the CmmonAction to return to the very same view that includes the ascx file?Perhaps I am missing a common pattern in MVC web development?

View 5 Replies







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