|
 |
aspdotnet_website_programming thread: Problem...
Message #1 by "GKrenn" <asp@m...> on Fri, 8 Nov 2002 08:32:36
|
|
HI!
I have the following problem:
I am creating string programatically in my .vb file.
How is it possible to show that strings on my page:
.vb-Code:
....
Dim i As Integer
Dim var_max_rec As Integer
Dim pr_str_date As String
var_max_rec = 0
var_max_rec = Ds_kalender.Tables(0).Rows.Count
For i = 0 To var_max_rec - 1
If (Ds_kalender.Tables(0).Rows(i).Item(0)) = sel_date Then
pr_str_date = CStr((Ds_kalender.Tables(0).Rows(i).Item(0)))
End If
Next
....
It does not work when I put a reference into the html code:
....
<P align="left">Datum:<BR><%=pr_str_date%>
<P> </P>
....
If I write the string out via
....
response.write (pr_str_date)
....
I get the string on top of the page.
How can I print out the string on a chosen position without using labels,
textboxes, etc?
TNX in advance..
Gerhard
Message #2 by "Pampin Picasso, Juan Pablo (PAZ)" <pampinjp@i...> on Fri, 8 Nov 2002 09:14:21 -0300
|
|
Use label or literal web controls.
Html:
...
<form id="Form1" method="post" runat="server">
...
<asp:Label id="Label3" runat="server"></asp:Label>
...
</form>
...
Vb Code:
Public Class XX
Inherits System.Web.UI.Page
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
...
Label3.Text = "Hi!"
...
End Class
-----Mensaje original-----
De: GKrenn [mailto:asp@m...]
Enviado el: Friday,November 08,2002 5:33 AM
Para: Website Programming with ASP.NET
Asunto: [aspdotnet_website_programming] Problem...
HI!
I have the following problem:
I am creating string programatically in my .vb file.
How is it possible to show that strings on my page:
.vb-Code:
....
Dim i As Integer
Dim var_max_rec As Integer
Dim pr_str_date As String
var_max_rec = 0
var_max_rec = Ds_kalender.Tables(0).Rows.Count
For i = 0 To var_max_rec - 1
If (Ds_kalender.Tables(0).Rows(i).Item(0)) = sel_date Then
pr_str_date = CStr((Ds_kalender.Tables(0).Rows(i).Item(0)))
End If
Next
....
It does not work when I put a reference into the html code:
....
<P align="left">Datum:<BR><%=pr_str_date%>
<P> </P>
....
If I write the string out via
....
response.write (pr_str_date)
....
I get the string on top of the page.
How can I print out the string on a chosen position without using labels,
textboxes, etc?
TNX in advance..
Gerhard
|
|
 |