Solved

ONSERVERCLICK w/ .ascx page - ThanX !

Posted on 2004-04-21
2
455 Views
Last Modified: 2008-02-01
Hi Experts !

I've having problem w/ my ONSERVERCLICK in a <A> Tag.

In my test01.aspx page I reference a .ascx page.

The ONSERVERCLICK resides in the .ascx page like this:

 <A HREF="test01.aspx" ID="First" ONSERVERCLICK="ShowFirstPage" RUNAT="server">
 <IMG SRC="images/firstpage.gif" BORDER="0"></A>


The ShowFirstPage method is in the ascx.vb (code-behind).

  Public Sub ShowFirstPage(ByVal s As System.Object, ByVal e As System.EventArgs)
    Server.Transfer("test01.aspx")
  End Sub

On the bottom left corner fo the IE browser, when the cursor is
over the image it reads: javascript:_doPostBack('test01$First',")

Nothing happens when I click on the image, and it reads:
"Error on page"

How do I get the method ShowFirstPage to trigger when it's being clicked?

If I don't have the .ascx page, and the method is in the .aspx.vb page
it'll work fine.

Any ideas?

I really appeciate your help, and thanks in advance !
0
Comment
Question by:allanau20
2 Comments
 
LVL 5

Author Comment

by:allanau20
ID: 10890922
Hi Experts,

I'm requesting that this question be dropped.

I'll just just a image server control, and have the click event trigger from code-behind.

Thanks.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10891116
Closed, 500 points refunded.
modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now