# Confusion with running code

**URL:** <https://forum.kirupa.com/t/confusion-with-running-code/309552>\
**Category:** Uncategorized\
**Created:** [May 18, 2010, 6:51pm UTC](https://forum.kirupa.com/t/confusion-with-running-code/309552 "2010-05-18T18:51:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vandel212](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@Vandel212](https://forum.kirupa.com/u/Vandel212)\
**Post date:** [May 18, 2010, 6:51pm UTC](https://forum.kirupa.com/t/confusion-with-running-code/309552/1 "2010-05-18T18:51:04Z")

</div>

I’ve done plenty of programming with C#, VB, HTML, and some others, but I’m pretty new to [ASP.NET](http://ASP.NET). I think I’m under a misconception and I cannot figure out where I am going wrong.

I downloaded Microsoft’s Visual Web Developer and started up a [asp.net](http://asp.net) web application. I went into the file Default.aspx.cs file, added the reference System.Microsoft.Forms (so I can use Messagebox.Show() don’t ask… I just like it), I put in the code:

```auto

private void test123()
{
MessageBox.Show("test");
}

```

I then went into the html and put in:

```auto

<p><% test123(); %></p>

```

When this page runs or i click on the tex or something… shouldn’t a message box appear? I’m under the assumption that when you put the test123() in between \<% %\> it will go into the default.aspx.cs page and run the code for test123(). How would I actually get that code to run?

Thanks
