Solved

how to insert ONE link dynamicaly/on page load on a page

Posted on 2007-04-06
1
223 Views
Last Modified: 2013-12-17
is it and how is it possible to dynamicaly create control on a web page.

example:
a search engine search. one inputs keywords and then the search is executed. on the search results page i need each keyword to be a link, but there can be one, two, three or more keywords. how to dynamicaly insert the links on a page?

don't worry about iteration, just tell me how to insert ONE link dynamicaly/on page load on a page.
thnx

c# asp.net mssql
0
Comment
Question by:qwekovaqwe
1 Comment
 
LVL 15

Accepted Solution

by:
dave4dl earned 500 total points
Comment Utility
first place a div in your page that you can drop controls in dynamically like so:

    <div style="width: 100px; height: 100px" runat="server" id="searchLinks">
    </div>

then add controls to it like so:
        HyperLink myLink = new HyperLink();
        myLink.Text = searchTerm;
        myLink.Target="http://mysite/mypage.aspx?"+searchTerm;
        searchLinks.Controls.Add(myLink);
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now