473,326 Members | 2,013 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,326 software developers and data experts.

Add controls at runtime

I have a page that is in Flow layout mode. I'm adding a list of hyperlinks
programatically with code such as :

HyperLink h = new HyperLink();
h.Text = pDesc;
h.NavigateUrl = "placeholders0.aspx?grp="+pGrp;
Page.Controls.Add(h);

(in a loop). The problem is that these appear all on one line on my page, as
in :

Link1Link2Link3

How can I force each link to be on a new line ?
Nov 18 '05 #1
3 1559
Same as if you were coding HTML by hand. Yo'ull have to add whatever you
want (BR tags for example) in between...

Patrice

--

"JezB" <je*************@blueyonder.co.yk> a écrit dans le message de
news:eT**************@tk2msftngp13.phx.gbl...
I have a page that is in Flow layout mode. I'm adding a list of hyperlinks
programatically with code such as :

HyperLink h = new HyperLink();
h.Text = pDesc;
h.NavigateUrl = "placeholders0.aspx?grp="+pGrp;
Page.Controls.Add(h);

(in a loop). The problem is that these appear all on one line on my page, as in :

Link1Link2Link3

How can I force each link to be on a new line ?


Nov 18 '05 #2
Ah but I'm new to web programming and have never done any HTML ! But I have
found out what you mean - thanks.

"Patrice Scribe" <no****@nowhere.com> wrote in message
news:uT****************@TK2MSFTNGP12.phx.gbl...
Same as if you were coding HTML by hand. Yo'ull have to add whatever you
want (BR tags for example) in between...

Patrice

--

"JezB" <je*************@blueyonder.co.yk> a écrit dans le message de
news:eT**************@tk2msftngp13.phx.gbl...
I have a page that is in Flow layout mode. I'm adding a list of hyperlinks programatically with code such as :

HyperLink h = new HyperLink();
h.Text = pDesc;
h.NavigateUrl = "placeholders0.aspx?grp="+pGrp;
Page.Controls.Add(h);

(in a loop). The problem is that these appear all on one line on my
page, as
in :

Link1Link2Link3

How can I force each link to be on a new line ?

Nov 18 '05 #3
Ok sorry. Just for completeness, most elements are just displayed "in line".
You have explictely to express that you want to go to the next line...

Welcome to the Web ;-)

--

"JezB" <je*************@blueyonder.co.yk> a écrit dans le message de
news:%2******************@TK2MSFTNGP12.phx.gbl...
Ah but I'm new to web programming and have never done any HTML ! But I have found out what you mean - thanks.

"Patrice Scribe" <no****@nowhere.com> wrote in message
news:uT****************@TK2MSFTNGP12.phx.gbl...
Same as if you were coding HTML by hand. Yo'ull have to add whatever you
want (BR tags for example) in between...

Patrice

--

"JezB" <je*************@blueyonder.co.yk> a écrit dans le message de
news:eT**************@tk2msftngp13.phx.gbl...
I have a page that is in Flow layout mode. I'm adding a list of hyperlinks programatically with code such as :

HyperLink h = new HyperLink();
h.Text = pDesc;
h.NavigateUrl = "placeholders0.aspx?grp="+pGrp;
Page.Controls.Add(h);

(in a loop). The problem is that these appear all on one line on my

page,
as
in :

Link1Link2Link3

How can I force each link to be on a new line ?



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rp | last post by:
Hi, How would I create runtime tabpages with runtime controls(textBoxes,comboBox, checkedListBox), inserting,deleting, and modifing the tabpages whenever I want to in C#? Thanks in advance. rp
9
by: David | last post by:
hello... i want to renove all controls from panel... i use this: foreach (Control c in panel.Controls) panel.Controls.Remove(c); but it's doesn't work... -- not all controls are removed...
2
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do...
0
by: DotNetJunkies User | last post by:
Hi All I am developing a site using ASP.Net I want to develop a site that generates forms ( textbox,check boxes etc) automatically ie is from database itself depending on the no of rows in the...
4
by: Chuck Ritzke | last post by:
Hi, I've searched the newsgroup and other sources to understand how to handle runtime controls and see I'm not the only one who's confused, but I'm still not quite sure of the best way to handle...
1
by: Jeff Smith | last post by:
Can I load custom web user controls dynamically and access the properties and methods without having to explicitly define custom control types (example 2 below). I have custom web control named...
1
by: Luc | last post by:
Hi, I have a TabControl and, at runtime, I need to add some tabpages. The problem is that each tabpage is similar to the others and contains several controls. If I do...
7
by: Varangian | last post by:
Hello is creating controls at runtime the same as designtime ? will a page be faster if controls are created at designtime rather than at runtime ? If so why ? thanks :)
1
by: Klaus Jensen | last post by:
Subject: Handling events of controls created at runtime I need to render some buttons at runtime based on a database, tie events to them, and handle the events when they fire. In Page_Load I...
4
by: TS | last post by:
Steven, i lost this message conversation from outlook express and made a post online (see last one on this page). Please answer it as it hasn't been yet. thanks The clientID of our controls...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.