Click here to Skip to main content
15,915,078 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: about publishing website Pin
sashidhar26-Sep-09 23:20
sashidhar26-Sep-09 23:20 
GeneralRe: about publishing website Pin
hasani200727-Sep-09 0:52
hasani200727-Sep-09 0:52 
AnswerRe: about publishing website Pin
sashidhar27-Sep-09 1:55
sashidhar27-Sep-09 1:55 
Questionchange data value by one when I click on checkbox in gridview Pin
robotz26-Sep-09 22:26
robotz26-Sep-09 22:26 
AnswerRe: change data value by one when I click on checkbox in gridview Pin
Christian Graus26-Sep-09 22:30
protectorChristian Graus26-Sep-09 22:30 
GeneralRe: change data value by one when I click on checkbox in gridview Pin
robotz26-Sep-09 22:39
robotz26-Sep-09 22:39 
GeneralRe: change data value by one when I click on checkbox in gridview Pin
Christian Graus26-Sep-09 22:50
protectorChristian Graus26-Sep-09 22:50 
QuestionVisual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
K.Safvi26-Sep-09 20:20
K.Safvi26-Sep-09 20:20 
AnswerRe: Visual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
Parwej Ahamad26-Sep-09 20:59
professionalParwej Ahamad26-Sep-09 20:59 
GeneralRe: Visual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
K.Safvi26-Sep-09 21:26
K.Safvi26-Sep-09 21:26 
GeneralRe: Visual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
Parwej Ahamad26-Sep-09 21:28
professionalParwej Ahamad26-Sep-09 21:28 
GeneralRe: Visual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
K.Safvi26-Sep-09 21:51
K.Safvi26-Sep-09 21:51 
AnswerRe: Visual Studio .NET Debugger Does Not Stop on Breakpoints When I Debug ASP.NET Pages in VS1.1 Pin
Abhijit Jana26-Sep-09 22:25
professionalAbhijit Jana26-Sep-09 22:25 
QuestionHow to read/write data from another website onto your webpage? Pin
Goalie3526-Sep-09 12:22
Goalie3526-Sep-09 12:22 
AnswerRe: How to read/write data from another website onto your webpage? Pin
Christian Graus26-Sep-09 12:44
protectorChristian Graus26-Sep-09 12:44 
AnswerRe: How to read/write data from another website onto your webpage? Pin
Not Active26-Sep-09 13:16
mentorNot Active26-Sep-09 13:16 
AnswerRe: How to read/write data from another website onto your webpage? Pin
Abhijit Jana26-Sep-09 13:17
professionalAbhijit Jana26-Sep-09 13:17 
QuestionRendering and Viewing Source in ASP.NET Pin
MarkMokris26-Sep-09 6:24
MarkMokris26-Sep-09 6:24 
AnswerRe: Rendering and Viewing Source in ASP.NET Pin
Abhishek Sur26-Sep-09 6:34
professionalAbhishek Sur26-Sep-09 6:34 
QuestionSharing same code-behind between multiple aspx pages Pin
tfaol26-Sep-09 3:01
tfaol26-Sep-09 3:01 
AnswerRe: Sharing same code-behind between multiple aspx pages Pin
Abhijit Jana26-Sep-09 3:10
professionalAbhijit Jana26-Sep-09 3:10 
AnswerRe: Sharing same code-behind between multiple aspx pages Pin
Abhishek Sur26-Sep-09 6:08
professionalAbhishek Sur26-Sep-09 6:08 
QuestionRe: Sharing same code-behind between multiple aspx pages [modified] Pin
tfaol27-Sep-09 2:09
tfaol27-Sep-09 2:09 
Thank you all Smile | :)

sorry if my question is not clear enough. |:

To be more detailed:

In our project, we have a business and data layers. Each has a class with related methods and properties that can be accessed by any web form within the project.

What we're working on is:

Develop a bilingual system, create 2 pages for the same purpose but with different UI language. we're looking for using the same code-behind file for both of them but with a little difference which is in a Button Click event called "Back" that specify different 'Redirect' link.

we tried the the 2 methods mentioned above.

In the 1st option we considered one of the 2 pages class, which has all needed methods and properties in code-behind, as a base class of the other one, which has no methods.

e.g.
Project called: MyProject
page 1 called: Page_1.aspx
page 2 called: Page_2.aspx
Page_1.aspx.cs is a base class,
Page_2.aspx has the following page directive:

<%@ Page Title="" Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="Page_2.aspx.cs" Inherits="Page_1.MyProject" %>

Now, I need to know which option is the best in our case?


One more question:

while using the 2ed option, create a base class, we need to define some aspx page controls within the code to be accessed by any methods in the base class. we faced a problem when tring to declare them as a class data member?!

Note: we use a master page, so the controls in aspx pages are placed in a content holder
and because of this we use the following declaration statement:

Label Label1 = (Label)this.Master.FindControl("ContentPlaceHolder1").FindControl("Label1");

the error occured when using 'this': "keyword 'this' is not available in the current context"

any suggestions please?


Thanks again. <=

modified on Sunday, September 27, 2009 8:38 AM

AnswerRe: Sharing same code-behind between multiple aspx pages Pin
Nicolas Muniere14-Mar-10 8:11
Nicolas Muniere14-Mar-10 8:11 
AnswerRe: Sharing same code-behind between multiple aspx pages Pin
tfaol14-Mar-10 23:39
tfaol14-Mar-10 23:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.