473,749 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add a link in linkbutton, am using Visual Studio 2008 C#

77 New Member
Hello everyone,
I am making a website using visual studio 2008; in C#. I want my page to navigate after clicking a button, I used linkbutton, but I didn't like it, as it looks different than the button. And I also don't know how to use anchor tag in c#. One more thing, I want to have a drop down list, after clicking a button, but couldn't find any option like that. I don't want to use a drop down list directly... as am having all the buttons in a row and I want all of them to look like a button.
Feb 8 '14 #1
3 2466
Time
77 New Member
I want a button to have a drop down list...how to do it?
Feb 8 '14 #2
Time
77 New Member
Expand|Select|Wrap|Line Numbers
  1. DropDownList1.SelectedIndex == 0)
  2.         {
  3.             Response.Redirect("page")
  4.         }
the above code helped!
Feb 8 '14 #3
Frinavale
9,735 Recognized Expert Moderator Expert
I am making a website using visual studio 2008; in C#. I want my page to navigate after clicking a button...
Handle the click event for the button and call Response.Redire ct method to redirect to the other page.

For example, if you had a button named "NavigateToNext Page" defined in your asp code like this:
Expand|Select|Wrap|Line Numbers
  1. <asp:Button id="NavigateToNextPage"
  2.            Text="Go To Next Page"
  3.            OnClick="NavigateToNextPage_Click" 
  4.            runat="server"/>
Your C# code could look something like:
Expand|Select|Wrap|Line Numbers
  1. void NavigateToNextPage_Click(Object sender, EventArgs e)
  2. {
  3.     Response.Redirect("http://theNextPage.aspx");
  4. }

And I also don't know how to use anchor tag in c#...
You use the Hyperlink Class to create anchors in ASP.NET


One more thing, I want to have a drop down list, after clicking a button, but couldn't find any option like that
Add a DropDownList to your page and set its Visible property to false so that the control is never rendered into the HTML by default. Then, in the method that handles the click event for the button that displays the DropDownList, set the Visible property to true.


-Frinny
Feb 11 '14 #4

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

Similar topics

0
1554
by: Dutt | last post by:
AMD x86/x64 and Multi Core using Visual Studio 2008 http://msdotnetsupport.blogspot.com/2008/01/amd-x86x64-multi-core-visual-studio.html
0
1938
by: madasamonkey | last post by:
I'm using Visual Studio 2008. The o/s is Win XP Pro. Here's my problem: The machine I'm working on is a PC and the monitor resolution is 1280 x 1024 The target machine on which the app will run is a media centre PC hooked up to a 42inch LCD display, on which the screen res is 1360 x 768. I want the form to fill the entire TV screen, but my attempts to increase the form size to do this are thwarted by Visual Studio. Each time I try to set...
4
3035
by: Colin J. Williams | last post by:
The readme.txt has: All you need to do is open the workspace "pcbuild.sln" in Visual Studio, select the desired combination of configuration and platform and eventually build the solution. Unless you are going to debug a problem in the core or you are going to create an optimized build you want to select "Release" as
3
1588
by: hocking | last post by:
Hi,everyone ! I am using Emacs to edit source code ,i want to know how to compile code by using visual studio 2008 in emacs.
0
2918
by: Fakher Halim | last post by:
Does someone know any place to get working examples of inherence implemented in Entity Framework using Visual Studio 2008 SP1. I could only implement just one table per hierarchy ( http://www.codeproject.com/KB/architecture/LinqEntityFramework.aspx) -- Fakher Halim
4
1498
by: kilabyte | last post by:
Hi, First post on here, I can't see that the question has been asked before. I am new to Visual Studio 2008 (using VB), but a seasoned programmer using Access and VBA. I have created a web site in VS and a form that the user fills in on a web page. The results are written to a record on a server once the send button is clicked on. 10 items on the screen are validated (is a named entered, is an address entered, do money fields have a...
1
3827
by: mfaisalwarraich | last post by:
Hi Everybody, I am new to VB.NET. I have googled around for the connection string to connect with Sql Compact edition database. but i really have no idea how to do that. furthermore i dont know how to connect a form's fields to that database. please give me a very simple example of doing this which can really clear the concepts. i will be very grateful to you. thank you. and please tell me if i wana use ms sql server 2005 and dotn wana...
0
1425
by: KYAW KYAW OO | last post by:
Dear All, I am stuck on these C++ data types const wchar_t * since last week. It worked well in C# console application under mentioned below unsafe static void Main(string args) { IntPtr ld, data1, data2; string str = "test.txt"; int UTF_8 = 1;
1
1680
by: KYAW KYAW OO | last post by:
Dear All, I am trying to get the another dialog using double click where single click was selected as size of (300 x 150) on the picture image. So far separated single click is ok but difficult to get double click without timer or anything else. Steps are as follow 1. single click on the image then size of (300x150) area will assign at the click postion
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9568
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6079
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4709
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.