Hi
I have a non code behind web form done previously. How can I turn it into a
web form with an associated code behind file?
Thanks
Regards
Hi...
Lets say you have a page... name Test.aspx
.... add a class
Test.aspx.cs
by default the class is
public class Test
{
public Test()
{
//
// TODO: Add constructor logic here
//
}
}
modify the class
public partial class Test
age
{
public Test()
{
//
// TODO: Add constructor logic here
//
}
}
making it partial and inherit from "page"
now make change the aspx file...
it should be like this
<%@ Page Language="C#" %>
modify it to
<%@ Page Language="C#" Inherits="Test" CodeFile="~/Test.aspx.cs"
AutoEventWireup="true" %>
thats it... you are good to go
Thanks
Masudur
www.kaz.com.bd