Use Of Abstract Class In Shopping Portal?
Jul 27, 2010
I just want to know that how can I utilize the concept of Abstract class, virtual class etc. in my shopping cart website. I have read the tutorial out there on internet and I saw some examples too, but those examples are so general that they dosen't fit into real world scenerio like I am searching for a shopping website. Same questions again and again comes to my mind that why to made a class only to give the declaration of methods and property.
View 4 Replies
Similar Messages:
Jan 29, 2010
When to use Abstract class and when to use Interface class.
View 10 Replies
Dec 21, 2010
From the following URL i got some doubts about the Recommendations for using Abstract class vs interfaces
[URL]
1. If you anticipate creating multiple versions of your component, create an abstract class. Abstract classes provide a simple and easy way to version your components. By updating the base class, all inheriting classes are automatically updated with the change. Interfaces, on the other hand, cannot be changed once created. If a new version of an interface is required, you must create a whole new interface. { Is there any example for this t ounderstand throughly ?} If you are designing small, concise bits of functionality, use interfaces. If you are designing large functional units, use an abstract class. If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members. { Is there any example for this t ounderstand throughly?
View 3 Replies
Mar 31, 2010
I am trying to compile the following code and i am getting the error:
Cannot create instance of abstract class .
m_objExcel = new Excel.Application();
m_objBooks = (Excel.Workbooks)m_objExcel.Workbooks;
m_objBook = (Excel._Workbook)(m_objBooks.Add(m_objOpt));
m_objSheets = (Excel.Sheets)m_objBook.Worksheets;
m_objSheet = (Excel._Worksheet)(m_objSheets.get_Item(1));
// Create an array for the headers and add it to cells A1:C1.
object[] objHeaders = {"Order ID", "Amount", "Tax"};
m_objRange = m_objSheet.get_Range("A1", "C1");
m_objRange.Value = objHeaders;
m_objFont = m_objRange.Font;
m_objFont.Bold=true;
// Create an array with 3 columns and 100 rows and add it to
// the worksheet starting at cell A2.
object[,] objData = new Object[100,3];
Random rdm = new Random((int)DateTime.Now.Ticks);
double nOrderAmt, nTax;
for(int r=0;r<100;r++)
{
objData[r,0] = "ORD" + r.ToString("0000");
nOrderAmt = rdm.Next(1000);
objData[r,1] = nOrderAmt.ToString("c");
nTax = nOrderAmt*0.07;
objData[r,2] = nTax.ToString("c");
}
m_objRange = m_objSheet.get_Range("A2", m_objOpt);
m_objRange = m_objRange.get_Resize(100,3);
m_objRange.Value = objData;
// Save the Workbook and quit Excel.
m_objBook.SaveAs(m_strSampleFolder + "Book2.xls", m_objOpt, m_objOpt,
m_objOpt, m_objOpt, m_objOpt, Excel.XlSaveAsAccessMode.xlNoChange,
m_objOpt, m_objOpt, m_objOpt, m_objOpt);
m_objBook.Close(false, m_objOpt, m_objOpt);
m_objExcel.Quit();
View 2 Replies
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
Oct 24, 2010
what is the function of abstract class, why design pattern need to build BLL and DAL
anyone give an example for my reference as I am getting strat to build my web-based project
View 3 Replies
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
Aug 19, 2010
I know what Singleton Pattern means and Abstract class means.What I wanted to know was how would this apply to real world.Could anyone give me any good example or simple explanation.Say I have a simple website, why would I use any of the above if any.Why would it simplify my architechture.
View 3 Replies
Dec 12, 2010
Error 1279 Cannot create an instance of the abstract class or interface 'System.Web.Mvc.FileResult'
[Code]....
I am using MVC 2. The same code works in my onather application. I have no idea about this error.
View 2 Replies
Jul 21, 2010
What is the use of abstract class design in real time projects
and how to use abstract clases and interfaces
and inheritense concepts
like big shoping portals or content managment,blogs etc
View 5 Replies
Mar 3, 2010
I am developing a couple of small ASP.NET application and would like to know what pattern. approach do you use in your projects.
My projects involve databases, using Data access and Business logic layers.
The data-access approach that I was using so far is the following(I read in some book and liked it):
For DAL layer:
Creating an abstract class that will define all database manipulation methods to implement.
The abstract class will contain a static "Instance" property, that will load (if instance == null) an instance (Activator.CreateInstance) of the needed type (a class that implements it).
Creating a classes that implement this abstract class, the implementation will be according to the databases (SQL, mySQL and etc) in use.
With this I can create different implementation according to database in use.
For BLL layer:
A class that encapsulates all all retrieved fields , and static methods that will call the DAL classes.
View 3 Replies
Feb 18, 2010
I am attempting to bind a Repeater (but it could be a GridView or ListView) to a list of objects. The List's type is an abstract type, which has two different classes derived from it, both with different properties. Because they have different properties, I cannot just have one ItemTemplate. If I bind a control to a property of one type of class and the other type doesn't have it, it throws an error.
Here's where I'm at:
I cannot use <% if (whatever) { %> some stuff <% } else { %> some other stuff <% } %> because I cannot access the databound item to make the choice based on its type. I cannot use the <%# %> syntax, which lets me use the databound information, because you cannot code logic like if...then...else. I cannot (rather not) call a function and return a string with the code because what I want to render is complex and contains further nested databound controls. Has anyone found an ingenious way of doing if it is this type of object, display these controls, else display these other controls?
View 4 Replies
Jan 17, 2011
I'm working on a SharePoint portal site, while user should be redirected to it from SAP Portal, both of the two portal, user is going to be authenticated through Active Directory.So is there a way to have a single sign on for both of them, so user login to SAP portal and then be redirected to sharepoint portal without providing his login credentials again?
View 1 Replies
Mar 8, 2011
I have created a shopping cart where i currently store items in a session but i want to get away from this.
so i am going to store it in a list.
how can i create a custom class for this and store the values everytime items are added.
View 2 Replies
May 17, 2010
I am following the Nerd Dinner tutorial as I'm learning ASP.NET MVC, and I am currently on Step 3: Building the Model. One part of this section discusses how to integrate validation and business rule logic with the model classes. All this makes perfect sense. However, in the case of this source code, the author only validates one class: Dinner.
What I am wondering is, say I have multiple classes that need validation (Dinner, Guest, etc). It doesn't seem smart to me to repeatedly write these two methods in the partial class:
[code]....
This doesn't "feel" right, but I wanted to check with SO to get opinions of individuals smarter than me on this. I also tested it out, and it seems that the partial keyword on the OnValidate method is causing problems (understandably so). This doesn't seem possible to fix (but I could very well be wrong).
View 1 Replies
Jun 18, 2010
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Cannot create an abstract class.
Source Error:
Line 150: <providers>
Line 151: <clear/>
Line 152: <add name="NDMSMembershipProvider"
type="CSW.Web.Security.NDMSMemberProvider"/>
Line 153: </providers>
Line 154: </membership>
Source File: C:DevCSW2srcCSW.Webweb.config Line: 152
View 1 Replies
Jan 19, 2011
We have an SAP portal, which is not user friendly from clients point of view, we as ASP.NET developers suggest to use ASP.NET as a presentation layer for SAP backend system instead of SAP portal.We already integrated successfully to SAP backend for data insert and retrieval.So, we need to show ASP.NET power to SAP Team! How an ASP.NET portal will be much better than SAP portal.We though of AJAX functionality, look & feel of UI, and application mobility (cross browser).
So, what are the pros and cons of an ASP.NET portal compared to SAP portal? What are the issues SAP portal has, ASP.NET doesn't?Briefly, how to convince decision makers of ASP.NET over SAP from UI/Performance points of view?
View 3 Replies
Jun 30, 2010
[Code]....
Im getting the error message:'User.Id.get' must declare a body because it is not marked abstract or externWhat does this mean? What am I doing wrong?
View 4 Replies
Oct 7, 2010
I have a table which houses two entities. StaticProgram and DynamicProgram. There is one column in that table called ProgramType which determines if a program is of Type static or Dynamic. Though these two entities are stored in one table (I am guessing because the primitive fields for Static and Dynamic programs are exactly the same) but from a business point of view these are two VERY different entities.
So, I created two Classes StaticProgram and DynamicProgram. However, I donot want to create two seperate Data Access Classes because it is going to be the exact same code replicated twice. I tried creating a "Program" class as base class and inherited StaticProgram and DynamicProgram classes but down casting is not supported so I can't return a "Program" object from the data access class and cast it to "StaticProgram" class.So, what are my options? Can I create an IProgram interface and have StaticProgram and DynamicProgram implement that interface and have my Data Access class return IProgram?
View 1 Replies
Mar 25, 2010
my landline phone is connected to my computer. Now in my asp.net website there is a textbox and a button . i filled a telephone number in the textbox and on button click i want that a call get connected to the no. in the textbox through my landline phone.
Is there any workaround for this in .net framework?
View 1 Replies
Mar 29, 2010
I am interested to create portal on cassandra services, since I faced some performance and scale issues starting from 1 million of records.
Definitely, it could be solved, but I am interested on other options.
My main issues is cost of updating all necessary indexes, to make reading fast.
First, is cassandra is good way for asp.net programmers? I mean, maybe there is some other projects, which worth to take a look
And second, can you provide any documentation samples on how to start with cassandra programming from C#
View 6 Replies
May 3, 2010
I have a web page which I have created to allow users to upload excel file sheet and thus these sets of data will be inserted into the database. However, as I was testing out, I realized that if the excel file is too large (i.e. mulitple sheets, > 5 sheets) , the portal may not be able to handle the large amount of data and displayed error message like the connection is reset. I tried it with only less than 5 sheets it will be fine. Any idea if there are any codes or mechanism which could solve this problem?
View 6 Replies
Oct 20, 2010
I am working on a project where on the same portal people from different location will login, so they get connected to different database depending on the location they choose at the time of login. There will be a dropdown list during login, where user can choose the locationI use ASP.NET Login control, security/membership class.So what is the best way to implement this, should i save different connection string in web.config and based on location choosen by user read them? I would also have to change LocalSqlServer connection string for login control, how do i do this dynamicaly?
View 3 Replies
Mar 31, 2010
I have a aspx page I'm trying to (remotely) debug. It should add an image and set the src. The value seems correct if i msgbox the value that should be used for the "ImageUrl"
But viewing the page there is no image and the src is:[URL] This is a mcaffee page so is this some security thing...that is just a wildcrazy guess. Maybe i'm missing something very obvious...I did not write the code and I'm not really a aspx developer.
[Code]....
View 2 Replies
Jul 25, 2010
I am working on a marketing module. This module will allow the admin to setup marketing plans; emails and sms sending to a list of receipients. The admin will select a specific date and time on which the marketing campaign will execute (i.e send emails and sms to a list of users).
Now the problem is that I have no idea of what I shall use to monitor the server time and how I can run a timer to check the date and check campaigns dates.
View 2 Replies