Can't access functions
-
Hello, I'm new to ASP.NET. I 've ben a C# programmer for about a year, but I'm just touching on the realms of web development. Anyhow... I'm having a problem. Everytime I try to compile and run my page, I get the following message: "CS0117: 'ASP.index_aspx' does not contain a definition for 'MyScript'" This is the code on my page: <%@ Page Language="C#" %> Test private void MyFunc(object sender, EventArgs e) { TextBox1.Text = "Test"; }
If it helps any, I'm using Microsoft Expression Web, because I don't have anything else other than C# Express (No asp.net support) I'd appreciate any help.
-
Hello, I'm new to ASP.NET. I 've ben a C# programmer for about a year, but I'm just touching on the realms of web development. Anyhow... I'm having a problem. Everytime I try to compile and run my page, I get the following message: "CS0117: 'ASP.index_aspx' does not contain a definition for 'MyScript'" This is the code on my page: <%@ Page Language="C#" %> Test private void MyFunc(object sender, EventArgs e) { TextBox1.Text = "Test"; }
If it helps any, I'm using Microsoft Expression Web, because I don't have anything else other than C# Express (No asp.net support) I'd appreciate any help.
You need to add the runat=server attribute to your script tag <runat="server"</b>>> It is a better implementation to use a code behind file, htough I'm not usre if Expressions supports this. Why not use Visual Web Developer Express Edition? <div class="ForumSig"><hr>only two letters away from being an asset</div></x-turndown>
-
You need to add the runat=server attribute to your script tag <runat="server"</b>>> It is a better implementation to use a code behind file, htough I'm not usre if Expressions supports this. Why not use Visual Web Developer Express Edition? <div class="ForumSig"><hr>only two letters away from being an asset</div></x-turndown>
Ha ha, thanks. I feel dumb. And, Expressions "allows" codebehind, but doesn't "support" it. Now that I know there's a Visual Web Developer Express... I'm off to go find it!