J
Jeff
Hey
asp.net 2.0
In the OnLimit method of the webpage I add several HyperLinks to a Panel.
Panel.Wrap = true (default). But during runtime the wrap doesn't work: It
just continue to add new Hyperlinks to the same line in the Panel even if
the line is full already...
What am I doing wrong here?
<asp:TableRow Height="100">
<asp:TableCell ColumnSpan="2" VerticalAlign="Top"
HorizontalAlign="Left">
<aspanel ID="Panel1" runat="server" Height="100%"
Width="350px" BackColor="Beige" Wrap="true">
</aspanel>
</asp:TableCell>
</asp:TableRow>
protected override void OnInit(EventArgs e)
{
HyperLink hyperlink = new HyperLink();
hyperlink.Text = "helloworld";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
double Rwidth = 0;
hyperlink = new HyperLink();
hyperlink.ID = "hyperlink1";
hyperlink.Text = "helloworld1";
hyperlink.Font.Size = 16;
//hyperlink.Font.Bold = true;
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld2";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld3";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld4";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld5";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld6";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
}
asp.net 2.0
In the OnLimit method of the webpage I add several HyperLinks to a Panel.
Panel.Wrap = true (default). But during runtime the wrap doesn't work: It
just continue to add new Hyperlinks to the same line in the Panel even if
the line is full already...
What am I doing wrong here?
<asp:TableRow Height="100">
<asp:TableCell ColumnSpan="2" VerticalAlign="Top"
HorizontalAlign="Left">
<aspanel ID="Panel1" runat="server" Height="100%"
Width="350px" BackColor="Beige" Wrap="true">
</aspanel>
</asp:TableCell>
</asp:TableRow>
protected override void OnInit(EventArgs e)
{
HyperLink hyperlink = new HyperLink();
hyperlink.Text = "helloworld";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
double Rwidth = 0;
hyperlink = new HyperLink();
hyperlink.ID = "hyperlink1";
hyperlink.Text = "helloworld1";
hyperlink.Font.Size = 16;
//hyperlink.Font.Bold = true;
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld2";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld3";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld4";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld5";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
hyperlink = new HyperLink();
hyperlink.Text = "helloworld6";
hyperlink.NavigateUrl = "www.vg.no";
hyperlink.Target = "_blank";
Panel1.Controls.Add(hyperlink);
Rwidth = hyperlink.Width.Value;
}