Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-04-06
1
Medium Priority
?
246 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
[X]
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
1 Comment
 
LVL 15

Accepted Solution

by:
dave4dl earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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 use and create keystrokes in Netbeans IDE 8.0 for Windows.

636 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