Solved

ONSERVERCLICK w/ .ascx page - ThanX !

Posted on 2004-04-21
2
460 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

733 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