473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing base class in User Control

Hi All,

I am developing a web application using VS 2005 asp.net 2.0 with C#. I have
my base class in "App_Code" folder and i have another folder called "Users"
where i have developed a user control called users.ascx. Now in my Users base
class i have some properties like FirstName,LastName and i want to display
them in my user control page users.ascx page. I have tried to get them in
several ways but i could not able to acheive the same.. i'm getting the error
"Make sure that the class defined in this code file matches the 'inherits'
attribute, and that it extends the correct base class (e.g. Page or
UserControl)."

Please help me in this issue..and suggest me where did i went wrong..

Thankx in Advance and any Suggestion is greatly Appriciated in Advance

Apr 9 '07 #1
1 1244
http://www.ben-rush.net/blog/PermaLi...f0a6f79&dotnet
--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"chakris" <ch*****@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
Hi All,

I am developing a web application using VS 2005 asp.net 2.0 with C#. I
have
my base class in "App_Code" folder and i have another folder called
"Users"
where i have developed a user control called users.ascx. Now in my Users
base
class i have some properties like FirstName,LastName and i want to display
them in my user control page users.ascx page. I have tried to get them in
several ways but i could not able to acheive the same.. i'm getting the
error
"Make sure that the class defined in this code file matches the 'inherits'
attribute, and that it extends the correct base class (e.g. Page or
UserControl)."

Please help me in this issue..and suggest me where did i went wrong..

Thankx in Advance and any Suggestion is greatly Appriciated in Advance

Apr 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jralford | last post by:
Hi, I have a main form with a number of controls on it. They are a range of different customized controls. There are some properties that belong to all of these controls, such as XOffset,...
3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
2
by: Vivek Sharma | last post by:
Hi There, I have a situation where I wish to load the controls dynamically on the basis of user role. Hence, I am using this code. if (UserRole == "IS Administrator") { Control UC1 =...
1
by: balystyk | last post by:
Are there any possible issues with creating a base class (adding common properties) for a user control using a class file and not a user control (.ascx and code-behind) in asp.net 2.0? I have...
2
by: RKT | last post by:
(Web Developer Express 2005, CSharp, C#) I've searched high and low... If have the typical _Default page. In it is a MultiView that contains another MultiView - in both of those are Views...
0
by: dkode | last post by:
Hello, I know this can be done, but it's beyond me at the moment, Here is my inheritance chain: class NavRole : UserControl { protected void AddSubmenu(string submenuFile); } class artist...
0
by: dkode | last post by:
Hello, I know this can be done, but it's beyond me at the moment, Here is my inheritance chain: class NavRole : UserControl { protected void AddSubmenu(string submenuFile);
5
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
9
by: J055 | last post by:
Hi I have a standard asp page which uses a MasterPage. The MasterPage contains a User control. How can I access a public method in the User control from my WebForm page? I can't move the method...
1
by: =?Utf-8?B?Y2hha3Jpcw==?= | last post by:
Hi All, Iam developing a web application using VS 2005 asp.net 2.0 with C#. I have my base class in "App_Code" folder and i have another folder called "Users" where i have developed a user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.