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

2 design pages using the same code-behind file and class

BM
Hi,

I' using ASP.net 2.0. I have 2 design pages, which are the same, but in
2 languages. Is it possible to use only one code-behind page for both
these pages bcoz, the code and logic and everthing else is the same and
I've taken care about the messages and other small differences in the
code. I've given the same Id for the web controls on both pages.
On the @page directive, I'm using the same file and class in the
'codefile' and 'inherits' attributes.
Everything seemed to work fine without any problem but,when I tried to
include 2 user controls for the header and footer section of the pages,
I started having problems. The compiler sometimes gives an error
message saying that the 'classname in the code-behind file is
ambiguous'. This error doesn't come all the time, but only some
times.Some times the error is 'Type 'user control' not defined'. when I
remove the user controls, and use include files in their place,
everything seems to work.

I don't want to use localization for some reasons.
Is what I'm doing is ok or is there any other way of handling this?

This is the @page directive I've used on both index.aspx and
ar-index.aspx file. I removed the ar-index.aspx.vb file and code is
only in index.aspx.vb as class index.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="index.aspx.vb"
Inherits="index" %>

Can somebody pl. help? Thank you.

Malathy.

Sep 24 '06 #1
0 1083

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

Similar topics

43
by: grz02 | last post by:
Hi, Im an experienced database+software designer and developer, but, unfortunately, anything to do with web-programming and web-systems designs is still a pretty new area to me... (been working...
0
by: grz02 | last post by:
Im an experienced database+software designer and developer, but, unfortunately, anything to do with web-programming and web-systems designs is still a pretty new area to me... (been working mostly...
0
by: Lefevre, Steven | last post by:
Hey folks - Thanks to everyone who gave input to my concerns. Of course, we don't intend to have the mysql port open to the world. We will have Apache/PHP connect on a unix socket, or to another...
3
by: Rushikesh | last post by:
I am designing a WEB BASED Accounting Software with ASP and SQL Server. For this I need some help for the Database design. My design is as follows. I)User table: User_id, UserName..... Users...
5
by: Wescotte | last post by:
I'm currently working on desiging several web based applications that would be grouped into a larger web based menu system. However I'm not sure exactly how to go about making it as secure as...
1
by: Stewart Rogers | last post by:
Hi all, I have been working on an ASP.NET application that is a kind of wizard ( a list of sequential pages ). We built that application for the CLIENT-A and it worked fine. After six months...
8
by: Devin | last post by:
I am using Microsoft WebMatrix to write my ASP.NEt pages, and one functionality that that seems to lack is the ability to make these pages look nice. Is there any program out there like Frontpage,...
2
by: Hexman | last post by:
Off on another journey through vb.net. What I want to do now is have a tab-control with 1 to 8 tab-pages for categories. I've read where there is not a hide method so I guess I'll have to...
2
by: tomhawkins1 | last post by:
Hi, I am trying to bolt a website together but my neatherthal fists do not posess an ounce of design flair. I was wondering if any of you talented people out there could have a look at the...
1
by: jason | last post by:
I've seen a few designs where developers condition dynamic web control on the same page, enabling/disabling/visible=true/false using viewstate and postback information to drive what the page does...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.