CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
  Explore    Item Entry    Profile   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML




Zone: > newsgroup > asp.net forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 7/29/2005 10:38:59 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 5 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
runaway_vibrato
Asp.Net User
Override imagebutton7/29/2005 10:38:59 AM

0/0

Im trying desperately to create clean XHTML code with .NET - could someone show me some code to get rid of the border="0" which is rendered on an imagebutton control? I have the following which wont compile...im compiling from command line with vbc /t:library /r:system.web.dll confirmbutton.vb - but it throws an error relating to System.ComponentModel.IComponent - hence me attempting to import it. Anyone any light on this?

Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.ComponentModel.IComponent

Public Class ConfirmButton
  Inherits System.Web.UI.WebControls.ImageButton

Protected Overrides Sub OnPreRender(ByVal e As EventArgs)

    'The MyBase keyword behaves like an object variable referring
    'to the base class of the current instance of a class
    MyBase.OnPreRender(e)

  End Sub

End Class

DMW
Asp.Net User
Re: Override imagebutton7/29/2005 2:40:51 PM

0/0

You don't need the Imports statement - you need to add a reference.

The command line should be

vbc /t:library /r:system.web.dll /r:system.dll confirmbutton.vb
Dave
eclbs
Asp.Net User
Re: Override imagebutton8/1/2005 2:54:19 PM

0/0

I'm having the same problem with XHTML validation, RV.

I've tried using  imageButton.Attributes.Remove("border") but no joy.

If you get a solution I'd really appreciate knowing it!

Cheers,

E

runaway_vibrato
Asp.Net User
Re: Override imagebutton8/2/2005 7:40:26 AM

0/0

BorderWidth="0px" to the asp:Imagebutton tag seems to add it inline along with the rest of the properties...
eclbs
Asp.Net User
Re: Override imagebutton8/3/2005 8:46:11 AM

0/0

you're right! Seems you have to add it before you can take it away.
Very odd, thanks for the tip.

cheers,

E
5 Items, 1 Pages 1 |< << Go >> >|



Search This Site:






Other Resources:
Error using an ImageButton in a GridView - general_asp.net ... Error using an ImageButton in a GridView, > ROOT > NEWSGROUP > Asp.Net Forum > ... override xml property. set up secure socket layer (ssl) using digital certificates ...
Class ImageButton ... adding the ImageButton to the Container, this size will override the defaults. ... Override this in subclasses to give behavior to the button. ...
ImageButton.Enabled Property (System.Web.UI.WebControls) public override function get Enabled () : boolean public override function set ... set to true for the EnabledImageButton image button, causing it to post back to ...
CodeProject: WinForm ImageButton. Free source code and programming help WinForm .NET class for an image button allowing for regular, hover, and ... protected override void OnMouseMove(MouseEventArgs e) { hover = true; if (down) ...
How to Create a Microsoft .NET Compact Framework-based Image Button ... how to create a .NET Compact Framework-based image button. ( 10 printed pages) ... we derive an ImageButton class from Control, and override the OnPaint and ...
Building the Image Button Building the Image Button. File: ImageButton.java. Contents. Overview ... Here, we override the class and implement the methods we are interested in: ...
search.cpan.org/src/JOANMG/Image-Button-0.53/lib/Image/Button/Set.pm ... reference with parameters to override on the buttons to print. ... head1 SEE ALSO F<Image::Button> for a description of how to make buttons, and a ...
 
All Times Are GMT