473,395 Members | 1,348 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,395 software developers and data experts.

Why is NavigateUrl not redirecting to the page?

1
Expand|Select|Wrap|Line Numbers
  1. protected void mytv_SelectedNodeChanged(object sender, EventArgs e)
  2.     {
  3.         TreeView tv = sender as TreeView;
  4.         var nodecheck = tv.SelectedNode;
  5.  
  6.             TreeNode tn = new TreeNode();
  7.             var pname = tv.SelectedNode.Text;
  8.             if (pname == "class4")
  9.             {
  10.                 tn.NavigateUrl = "test.aspx";
  11.             }
  12.         }
  13.  
I have my code as above.The navigateurl is doing nothing.Am i missing some thing here?
Jul 2 '14 #1
2 1289
yarbrough40
320 100+
I think NavigateUrl is a property. Not a function
Nov 1 '14 #2
Frinavale
9,735 Expert Mod 8TB
You are probably looking to use the Response.Redirect method.

See the link for documentation on this method and example code.

-Frinny
Nov 3 '14 #3

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

Similar topics

0
by: Don | last post by:
I am trying to do the following: I have a template column with a hyperlink in it. At runtime I want to set the navigateurl. When I try to set it back to the same page it puts the directory in...
1
by: Ben Fidge | last post by:
How do I get a page to redirect to another after a set time period? I've seen JavaScript code that will redirect to a given URL after 5 seconds bu am unsure how to embed this into an ASP.NET page....
4
by: Tomek R. | last post by:
Hello ! This post does'nt regard column hyperlink. I just have single hyperlink and want to create it's NavigateUrl dynamically. This is my test page <form id="Form1" method="post"...
5
by: Vear | last post by:
Sorry, very Newbie question here. I don't know what I'm doing wrong. I have to use a <asp:hyperlink> to go to another page. I want to pick up the value in a text box. This is what I've tried and It...
1
by: Richard Clark | last post by:
I have a page with a MultiView control. The page finishes by running a report (via a page redirect). Because there is often a delay with ReportsServer, I want to display a "final" view of "Report...
5
by: Dan | last post by:
Hi, i try to redirect to another aspx page with jscript. I use "OnClientClick" but nothing happens. I tried two ways. What am i doing wrong? Thanks Dan ....
2
nirmalsingh
by: nirmalsingh | last post by:
hai all, i am having 2 pages. login.html and city.html login.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...
3
by: sbettadpur | last post by:
hello all, i have one problem, after submitting form values into database table, at the same time page has redirect to another page i.e email form but i am getting error as header already sent....
5
by: vijay | last post by:
Is there a way using javascript (or anything else) to know where the users go after they leave my page? Like "Do you want to navigate away ..." does a good job of alerting people no matter how they...
18
by: mandlaanilbabu | last post by:
Your blog is very help full, I have one requirement like this I have a table CUSTOMER in that CUSTID,NAME,URL columns is thier CUSTID NAME URL 1 asp www.asp.net 2 weblog...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
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
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.