Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2007-04-06
1
234 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
ID: 18867408
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Store results in vb.net 3 24
jQuery - following an example but can I save data server side? 20 58
.NET 2008 VB and C# 6 39
Get month and date in a format 4 31
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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

856 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