Seperating Files Aspx and Code behind files [Resolved]

Posted by Naveenmanam under ASP.NET on 4/28/2010 | Views : 1407 | Status : [Member] | Replies : 12
Is it posible that if i keep ...

Code behind file in one folder And Aspx file in a seperate folder.

For e.g ...

App_CodBF
|_ Default.cs

App_UTF
|_ Default.Aspx

NaveenKumar


Responses

Posted by: Naveenmanam on: 4/29/2010 [Member] Starter

Up
0
Down

Resolved
thank you Mr.deepakdalal
i got it also

NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Why would wanna do that ?

Thank you for posting at Dotnetfunda
[Administrator]

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 4/28/2010 [Member] Bronze

Up
0
Down


Hi,

u can do this by specfying the CodeFile path of the aspx page to the .cs file path with CodeFile attribute

Thanks
Pavan Kumar
Mark Answer if this fits the need

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Pavanandey but what would be a reason someone would want to do that ?


Thank you for posting at Dotnetfunda
[Administrator]

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/28/2010 [Member] Starter

Up
0
Down
mr.Vuyiswamb you try for discourage i will try to new

NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/28/2010 [Member] Starter

Up
0
Down
i what that sol you don't know just help me..

NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/28/2010 [Member] Starter

Up
0
Down
thank you pavanandey...
it possible but how i don't know.. that way i asking..

NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 4/28/2010 [Member] Bronze

Up
0
Down
Hi,

Actaully no one mostly use this senario , but since he had asked i had replied him

Thanks
Pavan Kumar
Mark Answer if this fits the need

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Naveenmanam

There are many ways of doing anything, but there is always a Correct way of doing things. Some other things are better left alone. I am not sure why would someone in the world can try to separate an aspx file from its cs.

I will only advice on the good practices. Microsoft did not create it like that for no reason. There was a good reason.


Thank you for posting at Dotnetfunda
[Administrator]

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/28/2010 [Member] Starter

Up
0
Down
ok thank you mr.Vuyiswamb

i will try level best i am intrusting for new in different way


NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Thank you for posting at DotnetFunda

Kind Regards

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Er.deepakdalal on: 4/28/2010 [Member] Starter

Up
0
Down
Hi Naveenmanam


yes, you will do it by assigning the path of the code file in the Page directive

<%@ Page Language="C#" CodeFile="" AutoEventWireup="true" %>

Here in the above directive give source code file i.e .CS location in the CodeFile attribute and you will separate the aspx and the .cs file



Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response