Hi
I am using a master page for my web project, and it's all coded in C# (and it works). Within one of the pages I want to run some server sided code. I have added a button and double clicked it (using Visual Studio 2005) and it has taken me to the code. This is what I see.
<script runat="server">
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s)
End Sub
</script>
Now, I am under the impression that Sub is a VB command, and C# uses void? The actual page does not declare any langauage as it's referencing itself to the master page
<%@ Page MasterPageFile= "~/layout.master" %>
The master page itself does declare the language
<%@ Master Language="C#" AutoEventWireup ="true" CodeFile="homep age.master.cs" Inherits="homep age" %>
If this is the case, what have I done wrong? Any ideas?
I am using a master page for my web project, and it's all coded in C# (and it works). Within one of the pages I want to run some server sided code. I have added a button and double clicked it (using Visual Studio 2005) and it has taken me to the code. This is what I see.
<script runat="server">
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s)
End Sub
</script>
Now, I am under the impression that Sub is a VB command, and C# uses void? The actual page does not declare any langauage as it's referencing itself to the master page
<%@ Page MasterPageFile= "~/layout.master" %>
The master page itself does declare the language
<%@ Master Language="C#" AutoEventWireup ="true" CodeFile="homep age.master.cs" Inherits="homep age" %>
If this is the case, what have I done wrong? Any ideas?
Comment