473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

77
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 2450
Time
77
I want a button to have a drop down list...how to do it?
Feb 8 '14 #2
Time
77
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 Expert Mod 8TB
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.Redirect method to redirect to the other page.

For example, if you had a button named "NavigateToNextPage" 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
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
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...
4
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....
3
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
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 (...
4
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...
1
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...
0
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) { ...
1
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.