" SQL Helper Class " In Microsoft Application Blocks For .NET Is Excellent?
Jan 23, 2010
from years go i use "SQL Helper" class that exist in Microsoft Application Blocks for .NET and i used it for about 1 year in many projects but after that many senior recommend me not to use as it's have many problems in big projects and i let it but know in a new company they want to use it in a projects ... Could any make his recommendations about it / and if it's really excellent to use it have already issues ?Is there any other good solution rather than SQL Helper ?
View 2 Replies
Similar Messages:
Jan 4, 2011
To be able to implement paging i need to create a helper class (as mentioned on one example in the net ); so i have created a class that encapsulate the paging logic
public class PagingList<T> : List<T>
.
..
but when i reference this class in my view using the code below:-
Models.PagingList<Article>
The following error occurred. Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0246: The type or namespace name 'Article' could not be found (are you missing a using directive or an assembly reference?) Source Error:
[Code]....
Source File: c:UsersMohannadAppDataLocalTempTemporary ASP.NET Files
oot1f3f505f568b8e69App_Web_index.aspx.82d38c66.ffjpt45i.0.cs Line: 172
Show Detailed Compiler Output:
View 9 Replies
Jun 30, 2010
I have a class instance which is created by using Activator.CreateInstance() method. That class instance contains helper methods which are frequently used throughout the application. In order to avoid creating the instance multiple times, I'm just thinking about implementing an appropriate caching mechanism. The following consideration should be taken into account:
1) I can't use static class and methods.
2) There are around 6 instances (1 instance per class) per App Domain.
View 4 Replies
Mar 28, 2011
We have developed apllication in Microsoft VS 2008 and when we opening this same application with Microsoft VS 2010. Then it's asking to convert.
So can anybody tell me what it is converting exactly. Means it's open application in Microsoft VS 2010 and running properly also. But i am understanding whats happning while converting.
View 3 Replies
Jul 1, 2010
I wanted to write a code for JQgrid in asp.net .I have tried the same in asp.net MVC,but i want it now in asp.net .n MVC we use Helper class,and return json data,so what to do in asp.net where helper class can not be used.Serialization can be done with data to get it in json.,but what about Htmlhelper.
View 2 Replies
Mar 30, 2011
When is it appropriate to create a helper class for a sql server database using the asp.net framework? Basically I'm trying to create a minature wiki (with multiple pages) and storing all of the data/strings for a specific page into a table on it's own.
View 3 Replies
Jan 24, 2011
I need to use the standard ASP.NET membership database tables in plain winform projects, and I DO NOT WANT to add the ASP.NET dll, because my app must run with .NET Client framework, and not full framework. Does somebody knows of a helper class that links to ASP.NET tables in plain vanilla VB ot c# code? I mean with functions equivalent to CreateNewUser, CheckUserCredentials, isUserinRole, RoleList etc...
View 1 Replies
Nov 5, 2010
I have just added routing in a new asp.net 4 web forms application, and have got my route table set up ok and page requests are working fine. What I now want to do is use the Page.GetRouteUrl method whenever I need to generate one of my seo friendly Url's. I started to implement this across various pages then thought it might cut down on code a bit if I had a method in one of my own helper classes, that constructs this url (using the Page.GetRouteUrl method) as I might have several parameters that need to be specified against the Page.GetRouteUrl method each time.
However, within my helper class, it doesn't know what 'Page' is. I was thinking I could pass in 'Page' from the page that wants a routed url to be generated, but in some cases I want to construct one of these Url's in another class which doesn't know what 'Page' is, and in that scenario wouldn't be able to pass it in as a param (and therefore wouldn't be able to use the Page.GetRouteUrl within my helper class). What is the normal approach when wanting to use Page.GetRouteUrl within classes that don't have an instance of the Page object?
View 1 Replies
Jun 30, 2010
I'm working on a page with two sets of collapsable panels. using nHibernate) I get category objects with a list of items in them, and for each category generate a left panel and right panel. In both panels, there is a ListBox. Items are pre-populated to the left list box and the user can select and move items into the right list box (under the corresponding category.) As I've built and worked on it, I ended up with a lot of generic methods like buildPanel(side,categoryID) and then ended up with a lot of repeated if statements inside them to differentiate between the two sides
if type=PanelType.Left then
set these 5 id strings to access components
else
...
The code got messy, so I moved a lot of the logic and static builder strings for the component ids into a private helper class in order to make other parts of the main class easier to read and follow. The problem I see is that the private class is extremely dependant on specific structures in the parent class. There's a very minimal amount of encapsulation going on and I'm possibly making the logic harder to follow even if the individual components in the code are easier to read.
My question is: When you're using a private class like this, is it acceptable to have it tightly integrated with the parent class (since it's private and implemented in the same file), am I better to refactor again and find a way of either simplifying my original code to be as short as possible without the helper class (stick all category/panel functions in one spot and hide them in their own region when I'm not using them), or should I move towards putting more of the logic in the helper class and simply mapping my events directly to the subclass. After typing all this out, I'm leaning towards the last option, but I'm still torn/confused about the whole thing...
View 2 Replies
Mar 2, 2011
I was using the default MailMessage and SmtpClient classes for creating and sending HTML emails from a web forms website. The problem is I have a lot of hard coded HTML for formatting the email that gets sent. Is there a class that helps format emails for .NET?
View 2 Replies
Feb 3, 2010
With asp.net MVC 2, I have been trying to get Matt Hawley's Localization helper to work in my web application, but I am getting stuck feeding a null into the Language string variable. I can't figure out why I am doing this.
namespace MvcLocalization
{
public abstract class LocalizedControllerBase : Controller
{
public String LanguageCode { get; private set; }
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
LanguageCode = requestContext.RouteData.Values["languageCode"].ToString();
if ( !AppConfig.SupportedLanguages.Contains(LanguageCode) )
LanguageCode = AppConfig.DefaultLanguageCode;
System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CreateSpecificCulture(LanguageCode);
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
base.Execute(requestContext);
}
}
}
View 1 Replies
Sep 18, 2010
I have a static class (an helper class) which has the responsability to create control and add them to a panel passed by parameter, this method is used by a lot of
View 5 Replies
Dec 17, 2010
Is there a way to pass a reference of a page to a helper class? Scenario: [ASP.NET 2.0 Web Application] The page is a content page which has a MasterPage. The page calls a method in the helper class and passes the page byRef as an argument. The method in the helper class tries to find a control on the passed in page and set values. Problem: Only the MasterPage is being exposed and not the page I am trying to pass. Any recommendations on passing the page so that I can set the values of the controls within it?
View 5 Replies
Jan 14, 2011
I have an application that is hosted in Server 2008 Standard Edition.It has more than 50 active users that uses it. The problem is that when Temporary file size of Windows (C:Windows emp) reaches around 10MB, than the application blocks and the reports cannot be generated.When we clear this temp folder and reset Refresh IIS, the application starts working again.Below is the code we use to generate reports:
[Code]....
View 7 Replies
Mar 15, 2011
recommend a data access class / helper class for Access databases, similar to the sqlhelper class found in the (Data Access Application Block)?
View 6 Replies
Sep 7, 2010
i got microsoft visual web developer and do not understand what a class is would.
View 6 Replies
Nov 25, 2010
I want to use some features of namespace Microsoft.VisualBasic.CompilerServices but I am unable to get CompilerServices Class in Microsoft.VisualBasic. whenever I write imports Microsoft.VisualBasic. intelesences does not show me CompilerServices tell me sutable reason to resolve this. I am using vs3.5, even though visual studio allow me to import Microsoft.VisualBasic but using only this my requirement will not fullfill.
View 3 Replies
Oct 20, 2010
I am trying to use Operator class to ConcatenateObject in my Class file of ClassLibrary. I have imported namespace of Microsoft.Visualbasic but still Operator class is not recognized. [URL] If I am trying to use add reference of Microsoft.VisualBasic.dll system say that it is already automatically adeed.
View 6 Replies
Dec 16, 2010
It looks that the old SqlHelper class from the Microsoft Enterprise Library has been mostly replaced by the Database class which is included in the new Enterprise Library version 5.
I have a very simple and trivial example:
using Microsoft.ApplicationBlocks.Data;
private void PopulateCheckBoxGroup()
{
const string strConnTxt = "Server=(local);Database=DataBindTests;Integrated Security=True;";
const string strlSql = "select Technology from PreferredTechnology where ParentId = 1";
CheckBoxList1.DataSource = SqlHelper.ExecuteReader(strConnTxt, CommandType.Text, strlSql);
CheckBoxList1.DataTextField = "Technology";
CheckBoxList1.DataBind();
}
View 1 Replies
Nov 15, 2010
Is there any way to list all the class in my ASP.Net application(Including class in App_Code and Partial Class(aspx pages and asmx user controls)
View 3 Replies
Jan 23, 2010
I am planning to start learning asp.net mvc. And also I want to learn Microsoft's Data Access application block. But I dont want to waste time in MDAC block if theres a better option to go for, or if MVC provides any good feature than MDAC. As I have heard MVC architecture automatically generates code.
View 2 Replies
Mar 31, 2011
Coding Platform: ASP.NET 4.0 with C#
Building a website using ASP.NET membership(forms authentication) and options to link Open IDs to it. I would like to have Microsoft Live as an OpenID option in this website. Well I have not seen Login using Windows Live ID except at forums.asp.net, but then both are Microsoft websites.
Today, I stumbled upon a website that seems to be using Microsoft Live Connect or whatever. I tried searching for it but I couldn't get any documentation regarding an API for Live Connect.
Here's the URL: http://messengerconnectidentity.mslivelabs.com/
View 2 Replies
Jan 26, 2010
I just installed VS 2005 on a Win Server 2003 box, and went to create a new web project. I noticed right away that the "Web" project was missing and found that the "Microsoft Web Application Projects" did not install on the server.I checked on a couple other boxes that have VS 2005 installed on them, and they all had "Microsoft Web Application Projects" installed. Does this not install on a Win 2003 box? How do I install this?
View 1 Replies
Feb 21, 2011
I have been using using Microsoft.Office.Interop.Word in my webserver (yes, i know it is not recommended). When I ran it on my machine, it runs fine, but when running on the server I get a timeout on the following line:Documents.Open //when trying to open the file.Is there something I'm missing? Is there a better way to edit a Word document within web servers/websites? (I can't create a new one using string builder or outputting into file; I need to edit an existing one that sits on the server.)
View 1 Replies
Apr 12, 2010
I have just deployed a MVC web application onto our intranet. The application is hosted on a Win 2003 R2 SP1 server and running on IIS 6.0. Everything works fine within the application. But our intranet uses the windows Indexing service for providing search functionality on our intranet website.The search brings up related links to files within the MVC web application. But the problem is the links don't work as MVC urls do not point to absolute files.Is there a way to resolve this?
View 6 Replies