[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Reference to LoginView's child controls

Posted on 2006-06-07
3
Medium Priority
?
447 Views
Last Modified: 2012-08-14
I add a loginView control (named loginview1) to a webpage and then add a hyperlink (named hyperlink1) to the loginview control. How can I reference to hyperlink1 in code view mode. For example:
Loginview1.LoggedInTemplate.Hyperlink1.NarvigateURL = "http://" 'This doesn't work
Thank you.
0
Comment
Question by:maidinhtai
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
REA_ANDREW earned 1600 total points
ID: 16855028
I achieved it like this

        HyperLink MyHyperLink = (HyperLink) LoginView1.FindControl("HyperLink1");
        MyHyperLink.NavigateUrl = "http://www.msn.com";

you have to find the control and then cast it into a hyper link; I work in C#
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16855033
I think the VB counterpart is CType(LoginView1.FindControl("HyperLink1"),HyperLink)
0
 
LVL 27

Assisted Solution

by:Sammy Ageil
Sammy Ageil earned 400 total points
ID: 16855103
Rea_Andrew is correct,
Dim myLink as hyperlink=CType(LoginView1.FindControl("HyperLink1"),HyperLink)
mylink.NavigateUrl = "http://www.msn.com"

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question