Access :: DBFactory Class?
Feb 13, 2011
Is DBFactory class supports concurreny internally in asp.net? If yes then how? And if no then how can I handle concurrency in asp.net? If there are thousands of users using same website at a time then how to handle concurrecy issue?
View 2 Replies
Similar Messages:
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
Aug 20, 2010
Since we can access the private data member of base class in the derived class with the help of friend function. How can we do the same in C# asp.net? I mean whats the alternative of friend function in C# asp.net
View 2 Replies
May 24, 2010
I have a class (name PageBase) that is inhariting System .Web.UI .Page and all my .aspx page behind classes are inhariting this class. This way I have put some common things in PageBase class.
For showing errors I want to put showMessage funtion in PageBase as well so that I may have not put it in every page and it will easy to manage this way.
Probem is that how PageBase class will access a control which is in aspx page in its child class (child class of PageBase) .
I dont want to pass control as argument to function in parent class, is ther any other way ?
View 7 Replies
Sep 15, 2010
Suppose we declare and define the variable in one class let say FirstClass and we want to use that variable in another class let say SecondClass which is outside of FirstClass .how to do this?
View 2 Replies
Jan 26, 2011
I Have a Gridview in page.aspx. this gridview i want to pass as a parameter to the constructor of a class1.cs.Can anybody tel me, How can this be done?
View 1 Replies
Apr 8, 2010
I am adapting a book example of a shopping cart application, and have almost, got it complety working. I am using an access database rather than a sql server one used in the example. Earlier on I found I had an issue with the sql datasource where I had to specify the provider name as below of I would get the error about provider keyname not being supported
ConnectionString
="<%$ ConnectionStrings:OICConnectString %>"
ProviderName
="System.Data.OleDb"
Now, within once of the classes, it refers to the database connection string and this is now where the same error occurs, when the page requires this class and it must be because the provider name is not specified, but i'm new to C# so I'm not sure how to do it.
Here is this part of the class
public
static
bool WriteOrder(Order o)
{
string cs =
WebConfigurationManager
[code]...
View 3 Replies
Nov 22, 2010
I am trying to do something such as:
<%= Class1.GetName %>
in my ASPX page, but my class1.vb can't work like this, I have to declare it first in the aspx page, how can I make my Class1.vb file be shared among the whole website?
View 1 Replies
Apr 9, 2010
During an adaption of a book based example application, to use an access database instead of sql server - I have come up with the final issue: It will not insert into the database! I suspect it might be to do with the OrderID, I do have it set to autonumber,but I am not too sure. This is the class that does the inserts, by adding customer information to customer table, order information to order table and ordeitems information to the orderitems table. When submitting this information on the webpage, there is the custom error that an error has occurred in your order due to this code page code behind
bool success = OrderDB.WriteOrder(order);
Session["cart"] = null;
Session["order"] = null;
if (success)
[code].....
View 9 Replies
Jan 19, 2011
i have a usercontrol named filebox (which wraps a fileupload and some related stuff) in a certain .net class i have need to use this type as a ctype but i cant seem to call ctype(aobject,filebox) or either ctype(aobject,Controls_filebox) (which is the correct name) how can i convert an object to this type?
View 1 Replies
Aug 17, 2010
What is the default access modifier of a class?
View 5 Replies
Feb 28, 2011
I have two projects in one solution :
Class Library for my BLL and DAL classes Web Application for my PL
Now I just use the keyword "using" in the BLL and DAL classes and get access to their methods easily. but now I try to reference the BLL and DAL in the web application project through the "using" keyword but it won't let me (the name space couldn't be found (are you missing reference ?)) .. then I tried to reference the library's dll (grabbed it from the ClassLibrary/bin/debug) and the same error just popped out again!
Summery:
My solution consists of two projects (ClassLibrary and a WebApplication) and I want to use/reference the classes/dlls of the class library in the web application
View 3 Replies
Jul 23, 2010
I've moved a class in my project into a class Library in the same solution. I've added a reference in the web project to the class library.
How do I access the methods in the class library?
View 2 Replies
Mar 1, 2010
i have a orderclass.vb and a Default.aspx.
on Default.aspx i have a label, orderclass.vb has a Select Case :
[Code]....
when the case=1 on orderclass.vb the label in Defaultaspx sould display "test"
View 11 Replies
Oct 29, 2010
Actaully i am careted one webservice name:service1,created one more class name: service2 this poperty class for webservice,My question is
1.How to access that property class in client side?
2.It's possible to create Layer archt. Inside the webservice?
View 4 Replies
Feb 9, 2010
Does anyone know how to access a Page Header (Me.Page.Header) from within a class?
I'm working in ASP.NET
View 1 Replies
Feb 15, 2010
Is it possible for a Controller Base class to access a parameter from an action link and if so how do I access that parameter within my Base Controller?
Action Link:
<%=Url.Action("Area_1419", "Home", new { SectionId = 1})%>
Base Controller Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Website.Models;
namespace Website.Controllers
{
public abstract class CategoriesController : Controller
{
public CategoriesDataContext _dataContext = new CategoriesDataContext();
public CategoriesDataContext DataContext
{
get { return _dataContext; }
}
public void SectionID()
{
int SectionID = Convert.ToInt32(Request.QueryString["SectionID"]);
ViewData["SectionID"] = SectionID;
}
public CategoriesController2()
{
//ViewData["Categories"] = from m in _dataContext.Categories where m.Area_ID == SectionID select m;
//ViewData["Categories"] = from c in DataContext.Categories select c;
}
}
}
HomeContoller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Website.Models;
using Website.ActionFilters;
namespace Website.Controllers
{
[HandleError]
public class HomeController : CategoriesController
{
public ActionResult Index()
{
return View();
}
public ActionResult About(int? SectionID)
{
//ViewData["Message"] = SectionID;
return View();
}
public ActionResult Area_1419(int SectionID)
{
return View();
}
public ActionResult Admin()
{
return View();
}
}
}
View 2 Replies
Feb 23, 2010
I have in my Models folder a Class named "Utilities".
I need to acces one method of that class inside a view, like <%if(IsASelectedCategory(item.categoryId, item.productId))%>
View 1 Replies
Aug 8, 2010
I have a custom class library that performs validation. I want to open up this class for use within Javascript. I understand that I can easily achieve this by utilizing WebServices/WCF or by creating a function on my page with the WebMethod attribute, but it'd be nice not to have to set all that up for every project.
Ideally I'd like to just add the WebMethod attribute to my class library methods and then call them using Javascript.
View 2 Replies
May 10, 2010
I am using <%# MyFormatClass(Eval("fieldname")) %> to display data in a grid view on my page. MyFormatClass works fine, but now I want to move it to a central location that can be used by many pages. When I try to access the class <%# Utils.MyFormatClass(Eval("fieldname")) %> it no longer works. Is this something we are allowed to do?
View 1 Replies
Jan 29, 2010
I have a created a solution using visual studio 2008 and added a new project namely "test".
In this project i added a folder namely "code" and in this folder i added a class file "class1.vb".
But i am facinng problem when i am going to create object of that class1.vb in default.aspx.vb page
i want to access my class1.vb methods.
View 4 Replies
Aug 19, 2010
I have added a static string variable inside a web page with it's class named VersionBase. The class is public, the variable is public, why can't I simply do VersionBase.MyString from anywhere inside the project like I can do with any other class?
View 13 Replies
Feb 8, 2010
Is that possible to get access to Session, Cache, Server.MapPath() from a class in App_code?
View 1 Replies
Aug 5, 2010
ASP.net C# 3.5 Framework, working in Visual Studio 2008 currently.
What I want is a Generic Data Access Class. I have seen several of them but what I want is to see one that I pass the Connection String and the SQL statement and it will return a List of Objects or when only one item an Object or when no response needed a boolean to let me know if it succeeded?
View 3 Replies
Jun 6, 2010
Is it possible to access a parent class from within an attribute.
For example I would like to create a DropDownListAttribute which can be applied to a property of a viewmodel class in MVC and then create a drop down list from an editor template. I am following a similar line as Kazi Manzur Rashid here.
He adds the collection of categories into viewdata and retrieves them using the key supplied to the attribute.
I would like to do something like the below,
public ExampleDropDownViewModel {
public IEnumerable<SelectListItem> Categories {get;set;}
[DropDownList("Categories")]
public int CategoryID { get;set; }
}
The attribute takes the name of the property containing the collection to bind to. I can't figure out how to access a property on the parent class of the attribute. Does anyone know how to do this?
View 2 Replies