Web Forms :: Use DataSet Or Custom Classes?
Mar 13, 2010
I am going develop a web site which will be getting 10000s of user on a daily basic at the beginning and expected to grow very fast. so would like to know In order to communicate with database like fetching and inserting records should i use DataSet or create my own custom classes.
[URL]
View 1 Replies
Similar Messages:
Mar 17, 2010
I defined the property as follow and in the Properties window, it just shows an empty textbox. While the CssClass property shows a list of CSS classes.
[CssClassProperty]
public
string HeaderStyleCssClass
{
get
{
return headerStyle;
{
set
{
this.headerStyle =
value;
}
}
View 3 Replies
Feb 15, 2010
I am a newbee with c# and asp.net.1- I have a grid view which is with name of GRIDVIEW12- GRIDVIEW1 is bound to dataset on PAGELOAD
GridView1.DataSource = dt1;
View 10 Replies
Mar 24, 2010
Can I use VB and C# classes together in the same asp.net 3.5 project?
View 3 Replies
Jan 11, 2010
I am new to LINQ. when we drag tables we get a dbml file and designer file.
For example DataClasses1.dbml and DataClasses1.designer.cs.
Once we have them then we can start using our LINQ Queries.
In my company project I do not see this designer files and instead there are .tt files which were used as templates to greate ABC.generated.cs files. Is this same as designer class?
View 3 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
Aug 11, 2010
I don't know if this has to do with how FindControl works or how scope works. But my base class is having a hard time seeing the fields of child classes. Currently I'm planning have the derived class set a property in the base class, but there are a lot of derived classes, so that isn't a very attractive solution.
[code]....
View 4 Replies
Jul 2, 2010
i have this application structure:
1. Presentation Layer which calls
2. Business Logic Layer which in turn calls
3. Data Access Layer to do the dealing with the database.
Now i have a Contacts page from where i can add a new contact to the database.So to add a New Contact i fill in all the required details and then call a Add Method (residing in the BLL) from the page, which in turn call a Add Method residing in the DAL.this method in the DAL returns the Current Identity of the record which is then return back to the BLL method and finally delivered on the page.this is fine. but what if a get an exception how do i handle it properly because the method in DAL has a return type of int and i dont want to throw another error!! coz other wise i will have to write try catch in almost all the methods.
//something like this
public int AddMethod(ContactClass contactObj)
{
int result = 0;[code]...
rather i want to show the user a user-friendly message which they can easily understand and in the mean while i will send a mail to myself documenting the Error that just occurred.how can i implement my custom exception classes.
View 2 Replies
Dec 15, 2010
I'm curious as to what people consider better practice, between duplicating model structure in the view model and using a mapping tool to move data between the two, or aggregate the model inside the view model, i.e. have a property on the view model class that is a reference to the actual model. Which is considered a better approach in general?
View 1 Replies
Jul 12, 2010
I have an existing dataset in VS2008 and app works fine untill I tried to add new datatable.It gave me the following error -
Custom tool error: Failed to generate code. Unable to convert input xml file content to a DataSet. Invalid XPath selection inside field node.
And designer.cs got deleted.If I mannually add datatable in .xsd then it is good.But that option is not acceptable.
View 2 Replies
Dec 21, 2010
I have a detailsview, template as follows:
[Code]....
Codebehind: creating dataset, getting data from sql with adaptor and filling into dataset object, then setting detailsview's datasource.
I add 2 button to above template to able to edit data at asp page, and added event handlers:buttons:
[Code]....
My question is, what to do inside the detailsview update event function to able to edit and update data. My method can be wrong too.
View 7 Replies
Mar 31, 2011
In my project I work with Entity Framework (LINQ to ENTITY). I only have ADO.NET Entity Data Model and a DAL (Data Access Layer). I also get the data due a WCFClientService. I have a gridview that needed to be exported in Excel.
FlexCel is a tool for generating Excel files based on a template. The only thing I see in demo's is that they work with DataSets.
Is there a way to convert the data in my gridview to a virtual DataSet?
I've written the following method to get the data:
[Code]....
View 1 Replies
Jan 9, 2011
Till now I used to design RDLC file before and assigned typed dataset table columns.Report processing mode is local. But now my stored procedure returns different columns based on condition i.e columns are not fixed every time. Now I need to add that columns to typed dataset and dataset is assigned to RDLC file. So dataset and RDLC files are create dynamically based on stored procedure result set columns.
View 1 Replies
Jan 18, 2010
What I am thinking is this? Is it possible for me to upload the data from an excel file to dataset of my application first, so that the user can view the data in a gridview to review it first, before the user strike the save button, to save it in the database. So, that in case there is a problem, the gridview will high light all the data with an error. So the user can easily pull out the excel and correct the data before saving it in the database.
View 4 Replies
Feb 4, 2010
Today I am facing the problem with Typed DataSet using DataSet.XSd file, And How to fetch, Delete and Update the Database through Dataset.xsd file.
View 9 Replies
Mar 5, 2010
how do i copy required row in dataset to a new dataset. i have bind a xml into a dataset and i need to display say row 3 to 5 only so i do a for loop but i have encounter problem when trying to copy the rows to a new dataset.
do i have to write the xml to datatable and bind it to dataset and from there copy over ?
View 7 Replies
Jul 21, 2010
i am wondering if i got a label that works out a price in default.aspx and then i want to show it on an invoice Invoice.aspx with Button.Attributes.add("onclick","popup(this)"); with java popup to show my invoice on button click how i am gonna get that label that works out the price to invoice.aspx?
here is my code sample,
[code]....
View 3 Replies
Jun 1, 2010
I am learning how to work with BLL and DAL
I have 2 class files in BLL and using DAL i am connecting to the sql database
in BLL i have a class called productsHelper.cs and using GetProducts() method used to fetch records from database
products.cs - have all insert,edit,delete methods
I want to bind all products to gridview
But I couldnt find how to do that.how to get those methods to my aspx.cs page from class files.and write code in there.
View 5 Replies
May 4, 2010
I have a paramater Country Which have options to select 10 different countries.. i am using 10 tablix one for each country .... When i select a country , only one tablix Gets visible and the other 9 tablix gets invisible.. The problem is that all the invisible tablix are calling sp that is dataset ... Cause it is reducing the performance of the report......how can i assign empty dataset to the tablix or conditionally change the dataset for the tablix based on a parameter...
View 2 Replies
Jul 2, 2010
I want to add a field to dataset from another dataset in ssrs?
View 3 Replies
Jan 13, 2011
If I included a page class into a namespace the Profile page property becomes undefined.Why and how to solve this problem.For example I want to include my pages classes into a namespace MyProject.UI.
View 2 Replies
Aug 19, 2010
I have a BasePage class that all of my content pages inherit from. In my BasePage, I have many Import Statements. It seems as though they carry over into the derived class as one would expect. However, if you were to try and access code in the client aspx design page, as you would in the code-behind, you run into problems.
For instance, in my BasePage i have a Public Enum named ThemedSites. It's just an enumerator that lists the 5 different themes my site could be skinned as. I, at times, need to do different things in code, and in design, depending on what theme I'm currently in. I have a Public Property named CurrentSite (might have been more appropriate to say CurrentTheme, but that's besides the point). CurrentSite's return type is ThemedSites. So in code, one would say something like:
[Code]....
This works great in any page that inherits the BasePage class. This falters when that very same logic is used in the design page like:
[Code]....
Now, it works if you fully qualify both sides of the condition, but that's not my question. My question is: why isn't the Imported NameSpace in the BasePage recognized in the client-side server tag, as one would think it would be, according to how it IS recognized in the server-side code-behind?
View 3 Replies
Feb 8, 2010
I've been tinkering for hours and I can't figure this out. Seems like it should be pretty straight-forward. Is it possible to use reflection to get a reference to a partial page class given the page's name and path so that I can iterate through the page and examine its controls? I am not looking to examine the currently loaded page, but another page within the same website.
View 4 Replies
Nov 1, 2010
I have problem in accessing form control "Lable" which resides on my Default.aspx and I want to change the lable text from a class "Functions.aspx.vb".
View 4 Replies
Oct 4, 2010
I have some code in my new asp.net app that I need to share. So i created a shared class called
"utilities.vb" and put it in the APP_CODE folder. There is a function I have in there that pulls a person's image based off of their MemberId.
[Code]....
And I can call this function from my page using utilities.FcnGetMemberImage(). Ok, so all good so far until it complains about...
"Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class"
when referring to the Server.MapPath()
But the problem is that if I don't make it a Shared Function, I can't access it from my other pages. But if I do make it a Shared Function, it throws this error. The fix is supposed to be that I either don't share the function, or
"add the shared keyword to the member declaration", according to Microsoft at
http://msdn.microsoft.com/en-us/library/xfsswe45.aspx
But I'm not exactly sure how to "add the shared keyword to the member declaration" or what this means exactly and how this might affect other parts of my code?
Or is there a better way to work around this dilemma?
View 3 Replies