•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 427,101 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,173 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1332 | Replies: 14
![]() |
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
Last edited by peter_budo : May 24th, 2008 at 7:16 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation:
Rep Power: 3
Solved Threads: 47
Did you put it in the event handler of the image button in the code behind file? I have tested it myself and got it working this end. It should look something like this:
Replace ImageButton1_Click with the name of you ImageButton_Click. That code needs to be in the code behind on the same page as your image button. Hope that makes sense and fixes your problem!
vb Syntax (Toggle Plain Text)
Partial Class _Default Inherits System.Web.UI.Page Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click Response.Redirect("copyofdefault.aspx") End Sub End Class
Replace ImageButton1_Click with the name of you ImageButton_Click. That code needs to be in the code behind on the same page as your image button. Hope that makes sense and fixes your problem!
Last edited by majestic0110 : May 21st, 2008 at 5:31 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
Did you put it in the event handler of the image button in the code behind file? I have tested it myself and got it working this end. It should look something like this:
vb Syntax (Toggle Plain Text)
Partial Class _Default Inherits System.Web.UI.Page Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click Response.Redirect("copyofdefault.aspx") End Sub End Class
Replace ImageButton1_Click with the name of you ImageButton_Click. That code needs to be in the code behind on the same page as your image button. Hope that makes sense and fixes your problem!
I did that but its the same. It is not really an imagebutton but an image. When I tried clicking on the image in Visual Web Developer it should take me to a Button_Click event function, but it took me to the .vb page only. If I add a regular button, it would work.
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,124
Reputation:
Rep Power: 3
Solved Threads: 47
Sorry I thought you were using an imagebutton. Try using an ImageButton instead, as I suggested above. it will work I have tested it.
Hope this fixes it.
1- An image button is a control that displays an image and responds to mouse clicks on the image.
2- An image control is just used to display an image.
Hope that helps you, please mark thread as solved when you get it working!
Hope this fixes it. 1- An image button is a control that displays an image and responds to mouse clicks on the image.
2- An image control is just used to display an image.
Hope that helps you, please mark thread as solved when you get it working!
Last edited by majestic0110 : May 22nd, 2008 at 6:35 am.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
age amd avatar blue gene chips database dell development dos drivers economy energy enterprise firefox graphics hardware ibm ibm. news intel intel ibm internet it linux memory microsoft mozilla news open open source open-source opengl openoffice ps3 recession red hat russia software source sun super supercomputer supercomputing system technology trends ubuntu vista windows working x86
- Button to open a new browser window (ASP.NET)
- Open Excel Sheet in Vb.net (VB.NET)
- Anyone good with Favlets? window links? (HTML and CSS)
- Opening Header in a new window? (PHP)
- Posting e-mail form problems (HTML and CSS)
- How to open a popup after a user closes browser window (JavaScript / DHTML / AJAX)
- owner form display problem (VB.NET)
- deactivating all windows except current window (VB.NET)
- Showing results of a form in new window (HTML and CSS)
Other Threads in the ASP.NET Forum
- Previous Thread: Sending sms through asp.net
- Next Thread: image imagemap difference



Linear Mode