Create Slim Version Of Large Object / Class

Jan 1, 2010

I have a product class which contains 11 public fields.

ProductId
ShortTitle
LongTitle
Description
Price
Length
Width
Depth
Material
Img
Colors
Pattern

The number of fields may grow with attributes for more specific product tyes. The description may contain a large amount of data. I want to create a slim version of this product class that only contains the data needed. I'm only displaying 4 of the 12 fields when listing products on a category page. It seems like a waste to retrieve all of the data when most of it isn't being used. I created a parent class of ProductListing that contains the 4 fields I need for the category page

ProductId
ShortTitle
Price
Img

Then created a class of Product that inherits from ProductListing containing all product data. It seems backwards as "ProductListing" is not a kind of "Product" but I just started reading about inheritance a few months ago so it's stil a little new to me. Is there a better way to get a slim object so I'm not pulling data I don't need? Is the solution I have in place fine how it is?

View 3 Replies


Similar Messages:

Cannot Create The Object Of Abstract Class

Apr 22, 2010

We all know that, we cannot create the object of Abstract class.

But why it is so?

I mean, can anyone explain it with real time example?

View 8 Replies

Create Object Of HttpResponse Class?

Feb 11, 2010

how to create object of HttpResponse class

HttpResponse response=new
HttpResponse (TextWriter
tx);

how to inplement this wrong code to right one & how to implement TextWriter.

View 2 Replies

Why Use Reference Of Abstract Class To Create Object

Jul 22, 2010

Why do we use the reference of abstract class (or base class) to create object of it's sub-class. eg: TextWriter is the abstract class for StreamWriter & StreamWriter.

TextWriter writer = new StreamWriter();

why can't we simply use :

StreamWriter writer = new StreamWriter();

View 3 Replies

VS 2013 / How To Create Instant Of Class By String Object

May 19, 2015

i need to create a instant of class by string value which store in hiddenfield.value()

string str = "myclass1";

var x = new <str>();

or

var x = new <hiddenfields1.value.tostring()>();

View 5 Replies

Web Forms :: How To Create Object Of Class File Using JavaScript

May 14, 2012

How to create object of class file (asp.net) using javascript and call is methods.

View 1 Replies

ADO.NET :: Unable To Create Object Variable For Linq Data Class?

Sep 23, 2010

For some unknown reason I suddenly am unable to create an object variable for a Linq Data Class. If I create a new project and try the process again with the same database everything works as advertized.The code I am using is Dim db As New RoggDataContext which gives me an error on the object variable "db": Overload resolution failed because no accessibility 'NEW' accepts this number of arguments.I have looked inside every file in the Web Project like the web config to check the connection string, gobal, and designer.vb looking for any errors whit no JOY. I also tried to create a new form and code behind with a button and received the same error.This is mind blowing because as I already stated, I can create a new Web Site and the problem goes away.

View 3 Replies

AJAX :: How To Create Object For Ajaxtoolkit.dll Class For Using Html Editor

Jun 2, 2010

Am looking for control like html editor in windows forms so i want to use ajaxtoolkit.dll for html editor.

Can i create object for toolkit and use htm editor.

for example while we composing mail we have options like bold italic for these options and also i want to change rich text to html code .

View 6 Replies

VS 2010 - Create Class To Return Data As List Object

Dec 4, 2013

I have a Google spreadsheet that I am reading data from and I want to load the data into a list object so I can use but I am having some issues.

Google Spreadsheet
-Worksheet name: Charts
-Tab: Color_Summarized
-Column 1: ColorSummary
-Column 2: ChildID
-Column 3: ParentID

sample rows:
Aqua|29|28
Blue|49|23
Yellow|55|28

My results are
Yellow Color_Summarized FH 55 28

How do I need to set it up so it keeps all the data loaded instead of just the last instance? Is there a better way then putting in class?

My code:

Code:
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Collections.Generic
Imports Google.GData.Spreadsheets

[code]....

View 3 Replies

Version .net Site Like Doing So With AssemblyInfo.cs In Class Libraries?

May 31, 2010

Is it possible to version a asp.net site like doing so with AssemblyInfo.cs in Class Libraries?

View 2 Replies

C# - How To Convert Json Object To Custom Class Object In Web Service

Aug 30, 2010

I've scenario where I want to insert data into database without post back. there are around 12 to 13 fields which i need to insert. I'm passing DTO from the client side which is actually Json object. Now the problem which i'm facing is how to convert that Json object which i got in webservice to the "class" (in my case class name is User) object.

[Code]....

In the above case AddNewUser method takes the object of User class. But i'm getting casting error. So how do I convert Json object to the "User" class object?

View 3 Replies

State Management :: Large Session Object Losing Value?

May 10, 2010

I have a asp.net application where I am saving off into session the user privilege information. From a grid I am bring up a new window by using the window.open. It seems that it is whiping out the values in session. A temporary bandaid I have placed on it is to recall the database if the value is nothing to reset the user object. I have found all over the internet that this is an issue with the window.open in IE 7 and IE 8. Has anyone else run into this and able to actually fix it?

View 4 Replies

To Add A Class To An Existing Class Attribute Of Object Via C#?

Jul 20, 2010

I have an existing class for an input, is it possible to add an additional class for the object in C#.net, instead of doing a if/else and not having a preset class on the object in the first place?

View 3 Replies

What Is Name Of Class To Make An Object Of Div Class

Jan 30, 2011

Actually i want to cast the type from find control to div but i cant find the class with div or body or form name why so?

View 5 Replies

ADO.NET :: Create Large Application Linq To Sql?

Dec 26, 2010

i am curious to know which is generic way to create DAL which can be used to large application and small applications using ?

1) What can i use to create large application Linq to Sql OR Entity Framework Or Any others ?

View 2 Replies

How To Create Mobile Version Of Website

Sep 2, 2010

i have a web created on asp

And i want to make it mobile phone web, such that user can use it through his / her cell phone. I don't have any knowledge about XML And also i don't have knowledge of .NET. How can I do this?

View 2 Replies

How To Create An Offline Version Of Website

Nov 22, 2010

Is there a way to generate offline version of the whole Website?

All my pages are in ASPX and uploaded onto the server. When I run a demo of my site, sometimes there are no Internet availability. So it would be great to actually have the site offline but not running Visual Studio in order to show the site.

View 3 Replies

Visual Studio :: How To Create Object In Object Test Bench

Jul 31, 2010

I used Object Test Bench to test my classes in VS 2008 professional edition . Right click on Class name and then selected create instance ,then its Constructor, there comes a dialog box, that just gives a message and a TextBox field is present there, i filled that field with any name and clicked OK.Then error message comes that "Create Instance Failed" and its error code is "0x80004005" . What's this ? How to instantiate object of my classes ?

View 4 Replies

Architecture :: Create A Method Which Looks Through A Large String Of Text?

Feb 17, 2010

I need to create a method which looks through a large string of text, and determines which words (apart from words like "a" "and" "the") are the most frequently used. I would like to determine which are the top 3 most frequently used words in a string of text...is this possible?

View 4 Replies

Web Forms :: How To Create Mobile Version Of A Website

Aug 31, 2012

I have googled this topic and found lots of solutions like

[URL] ....
[URL] ....

But still I am confused how to start. I have made some asp.net websites in which i was applying JQuery, Ajax, webservices this technology. Now i want to make that website in a lighter mobile version(windows phone, android phone, tablet, iphone, other mobile device).

View 1 Replies

Create A Dynamic Hyperlink That Always Looks For The Latest Version Of The Spreadsheet?

Jan 8, 2010

I am new to website development, so please be gentle!I am having difficulties in stopping a hyperlink to a Excel spreadsheet on my page from being cached by our proxyserver.The spreadsheet is updated on the web server in the background everytime a user updates a sql record, however because the hyperlink is to a static name, when the user clicks on the link, often a older version of the spreadsheet is opened.I have tried many caching parameters without joy and was wondering if it is possible to create a dynamic hyperlink that always looks for the latest version of the spreadsheet ?For example if I append onto the spreadsheet the date and time everytime the spreadsheet is updated, will the hyperlink be able to find it ?All my website code has been written in asp to date.

View 3 Replies

VS 2010 - Create A Page With Version And Contact Info

Nov 3, 2011

I'm looking to create a page with version and contact info. I want the page to open in the parent page and to be smaller than the main page. I also want the focus to be on the "about" page till it's closed..

View 1 Replies

Security :: Solution To Create Trial Version For Web Application At Client Side?

Jun 3, 2010

i am looking for solution to create trial version for web application at client side?

View 3 Replies

AJAX :: Failed To Create Designer Systems.web.ui.scriptmanager Version 1.0.61025?

Feb 9, 2010

I migrated a project from vs 2005 to vs 2008, in the vs 2008 project we will continue to use framework 2.0 only so i didnt migrated to 3.5

When I open a page in 2008 I got this problem in the scriptmanager.

I found this on the web.config

<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

View 4 Replies

Object Reference - Get An Object Ref Error Show Class Name With Error?

Jan 24, 2011

When I get an Object Ref error, it can sometimes be a real pain to find out which variable is causing the error (when you can't debug). Is there a way for this error to throw the classname that isn't assigned?

View 2 Replies







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