Web Forms :: Remove Red Border Around The Image When Using "HyperLink" Control?

Feb 9, 2011

I have few images on my aspx website and was trying to do a simple link to another page from the image. Noticed that the image control does not let me specify the url, and when i was playing wtih <a href... in source code i run into some issues.

Then i noticed HyperLink control and i used that one. In a property window i see "ImageURL", and "NavigateURL", so i guess that eliminated the need for a "Image" control.

The only problem that i run into with the "hyperlink" control is that once the link is created, the image has a "nasty" red border which i need to remove but i am not sure how to. I set border style to None and it did not work. Then i tried to set border width to 0 and still i have a red border around my image.

How do i remove that annoying red border and is there a better way to do image link with aspx?

View 4 Replies


Similar Messages:

Forms Data Controls :: Remove Border Datalist Using Hyperlink?

Dec 18, 2010

I have a Hyperlink inside a Datalist displaying an image... and on "IE" i get a blue border around it...

I“ve tried removing it through Css but didn“t suceed

Here is the .aspx page!

[Code]....

and here is The ItemDataBound

[Code]....

View 1 Replies

Forms Data Controls :: Remove The GridView Outside Border For Chrome And Safari?

Apr 19, 2010

i have gridview its working in IE and FF fine, but when i'm run in the Google chrome and safari, i gor outside border.

how i can rmove the only outside border to this both broswer?

View 6 Replies

Remove The Border Of A UpdatePanel?

Jan 16, 2010

I can't able to remove the border of the Update panel. It does not support style property.

View 4 Replies

VS 2008 - Remove CellSpacing / CellPadding / Border From Generated Markup?

May 6, 2010

I'm using a <asp:Login> control and it's automatically putting CellSpacing, CellPadding, and Border attributes into the generated HTML table. How can I stop ASP.NET outputting these attributes (without moving to ASP.NET 4)?

View 7 Replies

Custom Server Controls :: How To Remove The Border From Gridview Header

Sep 24, 2010

I have created a custom gridview that show "Select All | Clear All" hyper links in header to select the checkboxes in the gridview. That means that I have added these two hyperlink controls to the gridview header and am not showing the actual column headers.

[Code]....

Now, I want to remove the border that is displayed on the header row. How can I remove it? I tried th.BorderStyle = BorderStyle.None; but it didn't work. I need gridlines in the data rows but the header row should not have any border.

View 2 Replies

Custom Server Controls :: Remove The Border From Gridview Header?

Oct 21, 2010

I have created a custom gridview that show "Select All | Clear All" hyper links in header to select the checkboxes in the gridview. That means that I have added these two hyperlink controls to the gridview header and am not showing the actual column headers.

[Code]....

Now, I want to remove the border that is displayed on the header row. How can I remove it? I tried th.BorderStyle = BorderStyle.None; but it didn't work. I need gridlines in the data rows but the header row should not have any border.

View 7 Replies

Web Forms :: How To Get Rid Of Gray Border On Image Banner

Jun 22, 2010

I have put a hoplink inside an image like this. This is a test but when looking at the banner that is shown you can see a gray border along the banner (GIF).

Is it possible to get rid of this gray border that is around the actual banner here ?

[Code]....

View 5 Replies

Web Forms :: Can Ssign A Border-radius Using A Skin To An Image

Feb 19, 2011

I would like to apply rounded corners to all of my images of 5px. I tried doing it with a defniition in a skin (theme) file as :

[Code]....

View 1 Replies

Web Forms :: Hide Image Button Border In Page

May 30, 2012

I use image button in my page I don't want set image for it. My image button has border i set this code for itĀ 

border width : 0px

But again it has border how i can hide my image button border?

View 1 Replies

Web Forms :: How To Remove %20 From Hyperlink URL

Apr 25, 2012

I use asp.net in VS2008.

I use a database table field as a hyperlink in Gridview.

somehow it contains the %20 in the link.

I have trim the data from database.

Tell me how to remove the %20 from the hyperlink.

[URL] ...

View 1 Replies

Forms Data Controls :: GridView Row Border Style And Border Color

May 6, 2010

i have a gridview that directly bind to a dataset.Hence there is no column in code behind for me to control the boarder color and border style.I try my code in RowDataBound, but it does not take effect.

View 3 Replies

Adding A Class Attribute On The Image Tag Generated By The Hyperlink Control

Jun 14, 2010

I have a hyper link control and I set the NavigateURL and the ImageURL property at runtime. I also need to set the class of the image tag that it generates but I cannot figure out how I can do that. The solution mentioned here [URL] does not work because the image url is hard coded.

View 2 Replies

Web Forms :: Removing The Border Style For Dynamically Created Image Controls?

May 21, 2010

sometimes we need to use the asp image control so we can generate empty alt tags (visual studio 2005 does not render any attributes set
to an empty string). I know how to do this and also how to remove the border style that is automatically added

(http://blog.josh420.com/archives/2007/10/aspnet-image-control-border-width-inline-style.aspx).

We implemented this 6 months ago, however, only today have I discovered that it does not work when images are created dynamically.The first implementation was for asp images that have been set up within an aspx page:

-<asp:image runat="server" id="imgMast1" GenerateEmptyAlternateText="True" alternatetext="" imageurl="" />

The above works-no border style is rendered and the imageurl is populated in code.I have other pages where I'm building up sections dynamically using C# code, such as:-

System.Web.UI.WebControls.Image featureImage = new
System.Web.UI.WebControls.Image();
featureImage.GenerateEmptyAlternateText = true;
featureImage.ImageUrl = imageSrc;
divImage1.Controls.Add(featureImage);
divImageFeature.Controls.Add(divImage1);

When creating controls dynamically like this, the solution describe above does not remove the border style.

View 8 Replies

Web Forms :: Remove Hyperlink On ASPX Page

Jun 6, 2012

i have a hyperlink on the master page so when i click on this link it will redirect me on another page.....and also this link is visible to me i want to hide this link.

View 1 Replies

Web Forms :: Don't Want Parent Node To Do Postback - Remove Hyperlink

Aug 3, 2010

I have dynamic menu with sqldatabse. i don't want my parent node to do postback. how to remove Hyperlink for my menu header(Parent node)

View 7 Replies

Forms Data Controls :: How To Remove Hyperlink When The Gridview Column Value Is 0

Mar 8, 2010

[code]....

BroughtForward and Pending both columns contain hyperlink values. When we click the values then another page opens with the details. I don't want to open another page if user click 0 in any column or in other words how to remove hyperlink if there is 0 in any cell?

View 16 Replies

Web Forms :: Reflect Recently Changed Image File And Remove Cached Image From Browser?

Jul 10, 2013

<asp:Image ID="aspImagePreview" runat="server" AlternateText="Preview" Height="190px" Width="290px" ImageUrl="~/file1.jpg" />

when the file file1 has been changed or removed. How can I do one refresh to the item to make it reflect the recent change?

View 1 Replies

VS 2008 Locating An Image With No Page Border?

Mar 4, 2011

Another problem I am having is I have an image at the top right of a page and I want it to be hard against the edge of the page with no border and I am really struggling to get this to happen.

View 1 Replies

Hyperlinks Instead Of LinkButton - How To Avoid Border Around Image

Oct 1, 2010

I have an ASP.NET web site which contains some ImageButton controls that cause postbacks used to filter a list of products to certain groups of products.

The ImageButton was created something like this:

ImageButton _myImageButton = new ImageButton();
_myImageButton.ImageUrl = PicturePath + PictureName;
_myImageButton.Attributes.Add("border", "0");
_myImageButton.OnClick += handleImageButtonClick();
Controls.Add(_myImageButton);

Now I am moving to ASP.NET 4.0 with SEO-friendly paths like /products/category/item, and I'm using routing with Webforms to map URL's to webforms. In the process, I want to replace my image buttons with hyperlink controls showing the image, so that I can associate a navigational URL with each image.

I'm creating my new image hyperlink something like this:

HyperLink _myImageLink = new HyperLink();
_myImageLink.ImageUrl = PicturePath + PictureName;
_myImageLink.NavigateUrl = "/products/category/" + itemName;
_myImageLink.Attributes.Add("border", "0");
Controls.Add(_myImageLink);

The big problem I'm facing: the ImageButton used to put a border="0" attribute on the <img> tag in HTML to avoid a border around the image. But how can I achieve the same result using the hyper link control?

With the current setup, the border="0" gets stuck onto the <a href="...."> tag - and that's not exactly what I want / need.

View 3 Replies

Vertical Image Border Changes Alignment When Screen Is Not Maximized?

Apr 28, 2010

I have some pretty straightforward HTML code with a few tables to organize various items of text or images. All works fine except that I need to place a vertical border on both the left and right sides of the screen. I am able to do this with a 2x2 pixel image that I stretch out. When the user has their screen maximized, everything looks great. But when the user hits "Restore Down", then the borders stay in place, but the tables get shoved down so that they start below where the borders end, which is off screen. in other words, the relational alignment between the borders and the tables gets all screwed up. Does anybody know how to make this alignment stay consistent on a restore down? I'm pretty much a newbie with html and asp, so speak slowly. If there is a better method to accomplish this, I'm all ears.

Here is the relevant section of code:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<form id="form1" runat="server">
<asp:Image ID="LeftBorder" src="../Images/Border_Blue.jpg" runat="server"
WIDTH="15" HEIGHT="1000" BORDER="0" alt="Image Missing" align="left"/>
<asp:Image ID="RightBorder" src="../Images/Border_Blue.jpg" runat="server"
WIDTH="15" HEIGHT="1000" BORDER="0" alt="Image Missing" align="right" />
<table id="BannerTable" style="height: 100px">
<tr>
<td width="934px">
<img src="../Images/Header.jpg"
alt="Image Missing" id="ImgBanner" align="left"/></td>
</tr>
</table>

View 1 Replies

Web Forms :: How To Control The Title / Border And Others In A Webpart

Feb 7, 2011

how can I control the border ( currently it displays thin-line border) and control the display of heading (currently it display 'untitled') and other similar features.

<asp:WebPartManager ID="WebPartManager1" runat="server">
<Personalization Enabled="False" />
</asp:WebPartManager>
<asp:WebPartZone ID="WebPartZone1" runat="server" BorderColor="#CCCCCC"
Font-Names="Verdana" Padding="6">
<EmptyZoneTextStyle Font-Size="0.8em" />
<PartStyle Font-Size="0.8em" ForeColor="#333333" />
<TitleBarVerbStyle Font-Size="0.6em" Font-Underline="False" ForeColor="White" />
<MenuLabelHoverStyle ForeColor="#D1DDF1" />
<MenuPopupStyle BackColor="#507CD1" BorderColor="#CCCCCC" BorderWidth="1px"
Font-Names="Verdana" Font-Size="0.6em" />
<MenuVerbStyle BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px"
ForeColor="White" />
<PartTitleStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.8em"
ForeColor="White" />
<ZoneTemplate>
<site:AboutUs ID="AboutUSControl" runat="server" />
</ZoneTemplate>
<MenuVerbHoverStyle BackColor="#EFF3FB" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333" />
<PartChromeStyle BackColor="#EFF3FB" BorderColor="#D1DDF1" Font-Names="Verdana"
ForeColor="#333333" />
<HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC" HorizontalAlign="Center" />
<MenuLabelStyle ForeColor="White" />
</asp:WebPartZone>

View 3 Replies

Draw Image With Rounded Corners / Border And Gradient Fill In C#

Dec 1, 2010

I've looked everywhere and googled everything and couldn't find anything good. What I need is a class that is able to draw an image (graphics) with rounded corners (different on each corner is a plus) with a border and gradient fill.

All the examples I find have some flaws (like bad quality, missing functionality etc).

I will use this with a ashx that will draw the image and then show it to the user.

View 2 Replies

Web Forms :: Validation Control For Change Border Color Of Textbox

Jul 21, 2012

I want to change the background and border color of textbox when its validated bay validation control. Here ErrorMessage="*" But is want also change the background or border color of textbox.

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"

ErrorMessage="*"></asp:RequiredFieldValidator>

View 1 Replies

Web Forms :: Label Can Be Seen But Not The Hyperlink Over This Background Image?

Aug 26, 2010

I have a panel like this. I have an image control inside this panel that I have put as a background image for the panel using the style where I adjusting the z-indexes.This works fine!

I have put a label and a hyperlink like this in the <table>. The label can be seen but not the hyperlink which is the problem. I have tried to put a z-index to the hyperlink [Code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved