473,508 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Link Buttons

74 New Member
Hi there!

I'm developing an ASP.NET application.

I'm making use of a LinkButton Object to post my forum to the server.
The LinkButton is converted into a hyperlink once it is rendered as HTML for the browser.

Instead of displaying simple hyperlinks (to change my languages), I'd like to use <div> tags that represent buttons.

In order to extend the hyperlink so that the whole <div> acts like a button, right now I am placing a <div> within the <a> like so:
Expand|Select|Wrap|Line Numbers
  1. <a id="Lbtn_English" href="javascript:__doPostBack('BlahBla','')" style="color:White;text-decoration:none;">
  2.     <div id="English" class="languageSelectionButton" style="background-color:Blue;">
  3.         English
  4.     </div>
  5. </a>
  6.  
This is obviously not valid usage of the hyperlink HTML code.
Could someone recommend how to get around this problem using HTML?
(So that I can figure out how to get my ASP.NET code to render valid HTML)

Thanks
-LilOlMe
Dec 20 '07 #1
2 1821
drhowarddrfine
7,435 Recognized Expert Expert
That's not what <div> elements are for. I assume you have several buttons? Then it's a list of buttons. So:[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
li{list-style-type:none;
height:100px;width:100px;
outline:1px solid black;
}
a{
display:block;
height:100px;
width:100px;
background-color:red;
}
</style>
</head>
<body>
<ul>
<li>
<a href="#" style="">link</a>
</li>
</ul>
</body>
</html>
[/html]
Or something like that. I've got a headache.

Even better, you can use an image instead of the text.
Dec 20 '07 #2
lilOlMe
74 New Member
That's not what <div> elements are for. I assume you have several buttons? Then it's a list of buttons. So:[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<style type="text/css">
li{list-style-type:none;
height:100px;width:100px;
outline:1px solid black;
}
a{
display:block;
height:100px;
width:100px;
background-color:red;
}
</style>
</head>
<body>
<ul>
<li>
<a href="#" style="">link</a>
</li>
</ul>
</body>
</html>
[/html]
Or something like that. I've got a headache.

Even better, you can use an image instead of the text.
Thanks a lot for your help!
I didn't realize that you could set the hyperlink to be block style :D

I'd use images except that I'm trying to match a desktop application's look and feel....and they aren't using images :)

Thanks again!

-LilOlMe
Dec 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3578
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
0
885
by: Steve Lloyd | last post by:
Hi, I am having lots of problems when using a link button in a page that include modules, it is very strange, the javascript that is generated to submit the form comes up with an error and does...
1
447
by: brian | last post by:
'visual studio 2002 pro 1.0 framwork' I am creating dynamic Link buttons on my intranet site and assigning a click_event to them. A user clicks a link and I call the method to recreate the...
1
2569
by: Gopal Krish | last post by:
I'm have coded a simple menu (using link buttons as menu items) in a user control to be reused across many ASPX pages. In the page_load method I dynamically create the link buttons as follows ...
26
2878
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1,...
0
2396
by: prashantnurvi | last post by:
I have programaticaaly created several Link Buttons on my ASPX page, I would like to raise the Click event of these Link buttons, passing in appropriate parameters depending on the Link button I...
3
8511
by: Mark | last post by:
Assume you want to dynamically add one to many link button controls to a web page dynamically at run time. Each link button needs to post back and execute code. As the link buttons are created at...
5
2406
by: Matt | last post by:
Creating Dynamic aspnet link buttons with in user control, Then i use the control on ever page with wraped with master page. I get the url of the link buttons from xml. Parameter from xml also...
9
11878
by: lilOlMe | last post by:
Hi there! I have generated a GridView that looks something like: SportName| CompanyNameX |CompanyNameY |CompanyNameZ Hockey.....| Shipping------------ |Accounting-------- |Shipping------------...
3
7912
by: =?Utf-8?B?UGxhdGVyaW90?= | last post by:
I have link buttons in a Gridview that, depending on the value in another column (Not the Key column) will need to be disabled. For example, (Column2 has link buttons) Column1 ...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.