where to put sub?

  • Thread starter Thread starter Mr. T
  • Start date Start date
M

Mr. T

Hi,

i have a master page, and then my aspx page that uses that master page.

Now in my aspx i want to use a LinkButton to sort data on my page.

My question is where do i put the sub the LinkButton is calling to? If i put
it outside the <asp:Content tags i get an error that i can't place it there.
When i place the sub inside the content-tags i also get an error that i
can't place it there.

So where can i put the sub?

Thx in advance!

Regards,

Thomas
 
Hello Mr. T,

Ok, the sub should go on yourpage.aspx event handler, if you created your
form with a code behind page then you should have something like this:

yourpage.aspx ----> front end page or content page (html tags etc.)
yourpage.aspx.vb ---> code behind page in VB, Here is where your sub must
go!!!.

But, if you created your form with no code behind page then the sub must go
between the script tags at the top of your content page, check this out:

<%@ Page Language="VB" %>
<script>

Private your sub
End sub

</script>
<html>
<head>
<title>XXX</title>
</head>
<body>
</body>
</html>

Hope this helps
Verci
 
Back
Top