473,387 Members | 1,669 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,387 software developers and data experts.

reusing codebehind files?

hi.

I got a mainpage wich uses cutom controls.
i want to use the same codebehind for the customcontrol as i have for the
mainpage. is this possible?

yours truely /Anders
Nov 18 '05 #1
2 846
Using the exact same code behind isn't possible, but try placing the
code you want to share into a class that you can use from either
object.

--
Scott
http://www.OdeToCode.com

On Tue, 13 Apr 2004 11:06:46 +0200, "Anders Bohlin" <ab@news.nu>
wrote:
hi.

I got a mainpage wich uses cutom controls.
i want to use the same codebehind for the customcontrol as i have for the
mainpage. is this possible?

yours truely /Anders


Nov 18 '05 #2
okay, thanx

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:ch********************************@4ax.com...
Using the exact same code behind isn't possible, but try placing the
code you want to share into a class that you can use from either
object.

--
Scott
http://www.OdeToCode.com

On Tue, 13 Apr 2004 11:06:46 +0200, "Anders Bohlin" <ab@news.nu>
wrote:
hi.

I got a mainpage wich uses cutom controls.
i want to use the same codebehind for the customcontrol as i have for the
mainpage. is this possible?

yours truely /Anders

Nov 18 '05 #3

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

Similar topics

1
by: richardlane | last post by:
Hi, basic question here - I'm struggling with the transfer from asp to asp.net a bit, especially in seeing the 'bigger picture' of how things are best structured. I have a website made up...
3
by: Janderlen | last post by:
Hi, Im start to learning c#.... My question is I have a webform1.asp ¿What are the difference between write code c# inside the codebehind of the page (webform1.aspx.cs), and write c# code...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
12
by: A.M | last post by:
Hi, Using VS.NET 2003, If i use SRC page attribute instead of CodeBehind, do i still have intelisence and generally IDE support for that? Thanks, Ali
3
by: nevets2001uk | last post by:
Hi. I've just started my second ASP.NET (VB) app and I'm using codebehind this time. I'm not using visual studio but am instead coding it all in notepad (HTML, ASP.NET and CSS) I'm trying to...
2
by: Anders Bohlin | last post by:
hi. I got a mainpage wich uses cutom controls. i want to use the same codebehind for the customcontrol as i have for the mainpage. is this possible? yours truely /Anders
12
by: Wardeaux | last post by:
All, Wanting to find a way to create web pages to add to my website without having to recompile the codebehind everytime I want to add a new one... Here's the deal: I have a web app that takes...
2
by: One Handed Man \( OHM - Terry Burns \) | last post by:
I want to know if there is any way to specify the location of the class files in a directory off the route. It is possible to drag the class files to the Code directory and have it compile OK,...
7
by: Chris | last post by:
When I create a new aspx page, VS automatically creates the assocaited codebehind file also. Is there a way to specifiy what goes in that codebehind file by default? I mean, if I wanted to see a...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.