Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Thursday, March 29, 2012

newbie - page load not firing

Using asp.net 2.0. I have a page confirm.aspx:
**********************************
<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false"
CodeFile="confirm.aspx.vb" Inherits="confirm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
****************************************
*****************
This is my page behind page (confirm.aspx.vb):
Partial Class confirm
Inherits System.Web.UI.Page
Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
Response.Write("hello")
End Sub
End Class
****************************************
*******
When I confirm.aspx loads in the browser nothing happens. i.e. a blank
page is returned. Shouldn't "hello" be displayed? What am I doing
wrong?Change AutoEventWireup="false" to AutoEventWireup="true" and it should work.
If you're a newbie to .Net from classic asp, note that response.write will
output before all the other content. - i.e. before "<!DOCTYPE.....". But
you'll see that when you run it :)
Jevon
"Steve" <bahram@.iranmania.com> wrote in message
news:1130840485.862653.166360@.g43g2000cwa.googlegroups.com...
> Using asp.net 2.0. I have a page confirm.aspx:
> **********************************
> <%@. Page Language="VB" AutoEventWireup="false"
> CodeFile="confirm.aspx.vb" Inherits="confirm" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> </div>
> </form>
> </body>
> </html>
> ****************************************
*****************
> This is my page behind page (confirm.aspx.vb):
>
> Partial Class confirm
> Inherits System.Web.UI.Page
> Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
> Response.Write("hello")
> End Sub
> End Class
> ****************************************
*******
> When I confirm.aspx loads in the browser nothing happens. i.e. a blank
> page is returned. Shouldn't "hello" be displayed? What am I doing
> wrong?
>
Set AutoEventWireup to True and try.
"Steve" wrote:

> Using asp.net 2.0. I have a page confirm.aspx:
> **********************************
> <%@. Page Language="VB" AutoEventWireup="false"
> CodeFile="confirm.aspx.vb" Inherits="confirm" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> </div>
> </form>
> </body>
> </html>
> ****************************************
*****************
> This is my page behind page (confirm.aspx.vb):
>
> Partial Class confirm
> Inherits System.Web.UI.Page
> Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
> Response.Write("hello")
> End Sub
> End Class
> ****************************************
*******
> When I confirm.aspx loads in the browser nothing happens. i.e. a blank
> page is returned. Shouldn't "hello" be displayed? What am I doing
> wrong?
>
Thank you so much for that. I spent more than 2 needless hours this
morning getting frustrated over this. Thank you so much.
So does that mean the Page_Load event can never be captured if the
AutoEventWireup is set to false, or is there a way for the
AutoEventWireup to be set to false and for the Page_Load event to still
be captured?
Yes, manually hook up the handler method with the event:
Sub Page_Load (..., ...) Handles MyBase.Load
...
End Sub
(OR)
' Have the following line in any method/event handler that runs before page
load event.
AddHandler Me.Load, AddressOf Page_Load
"Steve" wrote:

> Thank you so much for that. I spent more than 2 needless hours this
> morning getting frustrated over this. Thank you so much.
> So does that mean the Page_Load event can never be captured if the
> AutoEventWireup is set to false, or is there a way for the
> AutoEventWireup to be set to false and for the Page_Load event to still
> be captured?
>

newbie - page load not firing

Using asp.net 2.0. I have a page confirm.aspx:

**********************************
<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false"
CodeFile="confirm.aspx.vb" Inherits="confirm" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
************************************************** *******

This is my page behind page (confirm.aspx.vb):

Partial Class confirm
Inherits System.Web.UI.Page
Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
Response.Write("hello")
End Sub
End Class
***********************************************

When I confirm.aspx loads in the browser nothing happens. i.e. a blank
page is returned. Shouldn't "hello" be displayed? What am I doing
wrong?Change AutoEventWireup="false" to AutoEventWireup="true" and it should work.
If you're a newbie to .Net from classic asp, note that response.write will
output before all the other content. - i.e. before "<!DOCTYPE.....". But
you'll see that when you run it :)

Jevon

"Steve" <bahram@.iranmania.com> wrote in message
news:1130840485.862653.166360@.g43g2000cwa.googlegr oups.com...
> Using asp.net 2.0. I have a page confirm.aspx:
> **********************************
> <%@. Page Language="VB" AutoEventWireup="false"
> CodeFile="confirm.aspx.vb" Inherits="confirm" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> </div>
> </form>
> </body>
> </html>
> ************************************************** *******
> This is my page behind page (confirm.aspx.vb):
>
> Partial Class confirm
> Inherits System.Web.UI.Page
> Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
> Response.Write("hello")
> End Sub
> End Class
> ***********************************************
> When I confirm.aspx loads in the browser nothing happens. i.e. a blank
> page is returned. Shouldn't "hello" be displayed? What am I doing
> wrong?
Set AutoEventWireup to True and try.

"Steve" wrote:

> Using asp.net 2.0. I have a page confirm.aspx:
> **********************************
> <%@. Page Language="VB" AutoEventWireup="false"
> CodeFile="confirm.aspx.vb" Inherits="confirm" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> </div>
> </form>
> </body>
> </html>
> ************************************************** *******
> This is my page behind page (confirm.aspx.vb):
>
> Partial Class confirm
> Inherits System.Web.UI.Page
> Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
> Response.Write("hello")
> End Sub
> End Class
> ***********************************************
> When I confirm.aspx loads in the browser nothing happens. i.e. a blank
> page is returned. Shouldn't "hello" be displayed? What am I doing
> wrong?
>
Thank you so much for that. I spent more than 2 needless hours this
morning getting frustrated over this. Thank you so much.

So does that mean the Page_Load event can never be captured if the
AutoEventWireup is set to false, or is there a way for the
AutoEventWireup to be set to false and for the Page_Load event to still
be captured?
Yes, manually hook up the handler method with the event:

Sub Page_Load (..., ...) Handles MyBase.Load
...
End Sub

(OR)

' Have the following line in any method/event handler that runs before page
load event.
AddHandler Me.Load, AddressOf Page_Load

"Steve" wrote:

> Thank you so much for that. I spent more than 2 needless hours this
> morning getting frustrated over this. Thank you so much.
> So does that mean the Page_Load event can never be captured if the
> AutoEventWireup is set to false, or is there a way for the
> AutoEventWireup to be set to false and for the Page_Load event to still
> be captured?
>

Newbie -- pls help

Hi all,

Reali need some help here.

I'm using <repeaterto display few thing taken from the dB.
1. hidden field, which contains the Language code (stored in dB)
2. Textbox

Code goes:

<asp:repeater id="myRepeater" runat="server">
<itemtemplate>
<asp:panel id="pnlCountry" runat="server">
<asp:table>
<tr>
<td>
<asp:label id="lblCounty" runat="server" text="T&Cs: "></asp:label><br>
<%# Container.DataItem("LanguageCode") %>
</td>
<td>
<asp:textbox id="txtTnC" runat="server" textmode="multiline" rows="10"
columns="45"></asp:textbox>
</td>
</tr>
<tr><td>
<INPUT id="hdnLanguage" type="hidden" runat="server" NAME="hdnAltLanguage"
value=<%# Container.DataItem("LanguageCode") %>>
</td>
</tr>
</asp:table>
</asp:panel>
</itemtemplate>
</asp:repeater>

OnClick of a button, i want to get the values entered in the textfields for
the different languages.

How do i do that? What events to use??

Pls help me!!!

Thanx lotz..

RegarDx..Well if you want to do something when someone click a button then put it in
the OnClick event handler. If you want to access the values in the labels
and textboxes in the repaeater control then you would use the command

myRepeater.FindControl("ControlID")

This will return a reference to the relevent control, although all controls
within the parent container (i.e. myRepeater) must have unique IDs.

your code for the asp:table markup is wrong. You have created an asp:table
but left out an ID and a runat=server which are required. You have also used
HTML row and column markup, to create rows and columns in an asp:table you
use <asp:TableRowand <asp:TableCell not <trand <td>.

"siLver" wrote:

Quote:

Originally Posted by

Hi all,
>
Reali need some help here.
>
I'm using <repeaterto display few thing taken from the dB.
1. hidden field, which contains the Language code (stored in dB)
2. Textbox
>
Code goes:
>
<asp:repeater id="myRepeater" runat="server">
<itemtemplate>
<asp:panel id="pnlCountry" runat="server">
<asp:table>
<tr>
<td>
<asp:label id="lblCounty" runat="server" text="T&Cs: "></asp:label><br>
<%# Container.DataItem("LanguageCode") %>
</td>
<td>
<asp:textbox id="txtTnC" runat="server" textmode="multiline" rows="10"
columns="45"></asp:textbox>
</td>
</tr>
<tr><td>
<INPUT id="hdnLanguage" type="hidden" runat="server" NAME="hdnAltLanguage"
value=<%# Container.DataItem("LanguageCode") %>>
</td>
</tr>
</asp:table>
</asp:panel>
</itemtemplate>
</asp:repeater>
>
>
OnClick of a button, i want to get the values entered in the textfields for
the different languages.
>
How do i do that? What events to use??
>
Pls help me!!!
>
Thanx lotz..
>
RegarDx..
>
>

Monday, March 26, 2012

Newbie Alert: Please help with repeater control and list box

Hi Guru's,

I am new to asp.net!

I can create a repeater control but would like to add a select list to
it as follows:

<%@dotnet.itags.org. Page Language="vb" debug=true %>
<%@dotnet.itags.org. import Namespace="System.Data" %>
<%@dotnet.itags.org. import Namespace="System.Data.SqlClient" %>
<script runat="server"
Sub Page_Load(sender As Object, e As EventArgs)
Dim myConnection As SqlConnection
Dim myCommand As SqlDataAdapter
myConnection = New SqlConnection("server=local;user
id=whocares;database=dbSeekersClientApp;Trusted_Co nnection=false")
myCommand = New SqlDataAdapter("SELECT ID, username, password,
firstname, surname, account_live FROM t_managers", myConnection)
Dim ds As Dataset = new DataSet()
myCommand.Fill(ds)

MyRepeater.DataSource = ds
MyRepeater.DataBind()

End SUb

</script>
<html>
<head>
</head>
<body
<form action="intro1.aspx" method="post" runat="server"
<ASP:Repeater id="MyRepeater" runat="server">
<HeaderTemplate>
<table width="100%" style="font: 8pt verdana">
<tr style="background-color:DFA894">
<th>
User ID
</th>
<th>
Surname
</th>
<th>
Firstname
</th>
<th>
Username
</th>
<th>
Password
</th>
<th>
Access
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="background-color:FFECD8">
<td>
<%# DataBinder.Eval(Container.DataItem, "ID") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "surname")
%>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,
"firstname") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,
"username") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem,
"password") %>
</td>
<td>
>>>>> Problem code

<asp:DropDownList id="dList1" width=100 runat="server">
<option
value=<%#DataBinder.Eval(Container.DataItem, "account_live")%>>
<%# DataBinder.Eval(Container.DataItem, "account_live") %>
</option>
>>>> Problem code ends

</asp:DropDownList>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:Repeater>
</form>
</body>
</html
Any pointers?Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"John sorCrer" <info@.emap.co.za> wrote in message
news:d70138e4.0403021226.36b59c74@.posting.google.c om...
> Hi Guru's,
> I am new to asp.net!
> I can create a repeater control but would like to add a select list to
> it as follows:
> <%@. Page Language="vb" debug=true %>
> <%@. import Namespace="System.Data" %>
> <%@. import Namespace="System.Data.SqlClient" %>
> <script runat="server">
> Sub Page_Load(sender As Object, e As EventArgs)
> Dim myConnection As SqlConnection
> Dim myCommand As SqlDataAdapter
> myConnection = New SqlConnection("server=local;user
> id=whocares;database=dbSeekersClientApp;Trusted_Co nnection=false")
> myCommand = New SqlDataAdapter("SELECT ID, username, password,
> firstname, surname, account_live FROM t_managers", myConnection)
> Dim ds As Dataset = new DataSet()
> myCommand.Fill(ds)
> MyRepeater.DataSource = ds
> MyRepeater.DataBind()
> End SUb
> </script>
> <html>
> <head>
> </head>
> <body>
> <form action="intro1.aspx" method="post" runat="server">
> <ASP:Repeater id="MyRepeater" runat="server">
> <HeaderTemplate>
> <table width="100%" style="font: 8pt verdana">
> <tr style="background-color:DFA894">
> <th>
> User ID
> </th>
> <th>
> Surname
> </th>
> <th>
> Firstname
> </th>
> <th>
> Username
> </th>
> <th>
> Password
> </th>
> <th>
> Access
> </th>
> </tr>
> </HeaderTemplate>
> <ItemTemplate>
> <tr style="background-color:FFECD8">
> <td>
> <%# DataBinder.Eval(Container.DataItem, "ID") %>
> </td>
> <td>
> <%# DataBinder.Eval(Container.DataItem, "surname")
> %>
> </td>
> <td>
> <%# DataBinder.Eval(Container.DataItem,
> "firstname") %>
> </td>
> <td>
> <%# DataBinder.Eval(Container.DataItem,
> "username") %>
> </td>
> <td>
> <%# DataBinder.Eval(Container.DataItem,
> "password") %>
> </td>
> <td>
> >>>>> Problem code
> <asp:DropDownList id="dList1" width=100 runat="server">
> <option
> value=<%#DataBinder.Eval(Container.DataItem, "account_live")%>>
> <%# DataBinder.Eval(Container.DataItem, "account_live") %>
> </option>
> >>>> Problem code ends
> </asp:DropDownList>
> </td>
> </tr>
> </ItemTemplate>
> <FooterTemplate>
> </table>
> </FooterTemplate>
> </ASP:Repeater>
> </form>
> </body>
> </html>
>
> Any pointers?

newbie ASP won't work

Hi,
I have just installed IIS on my XP SP2 machine.
This code (dreamweaver) doesn't work
<%@dotnet.itags.org. LANGUAGE="VBSCRIPT"" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
Good Afternoon<BR>
Welcome to this sample. It is approximately
<%=Time()%> at the server, Here
<body>
</body>
</html>
pls help
Jack"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...arkred">
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
____
I've spoted one error, but still doesn't work in preview

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
>
Here's the revision
<%@. LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
Good Afternoon<BR>
Welcome to this sample. It is approximately
<%=Time()%> at the server, Here
</body>
</html>
"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...arkred">
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
>
First, define "doesn't work." Describe symptoms, behaviors, error messages,
etc.
Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
microsoft.public.inetserver.asp.general.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
The sun never sets on
the Kingdom of Heaven
"Jacky Luk" <jl@.knight.com> wrote in message
news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
>
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> glsD:eiDp6EekFHA.1048@.tk2msftn
gp13.phx.gbl...
> First, define "doesn't work." Describe symptoms, behaviors, error
> messages, etc.
> Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
> microsoft.public.inetserver.asp.general.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> The sun never sets on
> the Kingdom of Heaven
> "Jacky Luk" <jl@.knight.com> wrote in message
> news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
the current time ,Time(), is not displayed
>
Jacky as ken Adviced this is ASP.NET newsgroup.
To display your time use:-
<%=Now()%>
Hope that helps
Patrick
*** Sent via Developersdex http://www.examnotes.net ***

newbie ASP wont work

Hi,
I have just installed IIS on my XP SP2 machine.
This code (dreamweaver) doesn't work

<%@dotnet.itags.org. LANGUAGE="VBSCRIPT"" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
Good Afternoon<BR>
Welcome to this sample. It is approximately
<%=Time()%> at the server, Here
<body
</body>
</html
pls help
Jack"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.g bl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
____
I've spoted one error, but still doesn't work in preview

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.g bl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
____
I've spoted one error, but still doesn't work in preview

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
Here's the revision

<%@. LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
Good Afternoon<BR>
Welcome to this sample. It is approximately
<%=Time()%> at the server, Here

</body>
</html
"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.g bl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
Here's the revision

<%@. LANGUAGE="VBSCRIPT" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
Good Afternoon<BR>
Welcome to this sample. It is approximately
<%=Time()%> at the server, Here

</body>
</html
"Jacky Luk" <jl@.knight.com> glsD:O7qvwDbkFHA.3968@.tk2msftngp13.phx.g bl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
First, define "doesn't work." Describe symptoms, behaviors, error messages,
etc.

Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
microsoft.public.inetserver.asp.general.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"Jacky Luk" <jl@.knight.com> wrote in message
news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
First, define "doesn't work." Describe symptoms, behaviors, error messages,
etc.

Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
microsoft.public.inetserver.asp.general.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven

"Jacky Luk" <jl@.knight.com> wrote in message
news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
> Hi,
> I have just installed IIS on my XP SP2 machine.
> This code (dreamweaver) doesn't work
> <%@. LANGUAGE="VBSCRIPT"" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=big5">
> </head>
> Good Afternoon<BR>
> Welcome to this sample. It is approximately
> <%=Time()%> at the server, Here
> <body>
> </body>
> </html>
> pls help
> Jack
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> glsD:eiDp6EekFHA.1048@.tk2msftngp13.phx.g bl...
> First, define "doesn't work." Describe symptoms, behaviors, error
> messages, etc.
> Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
> microsoft.public.inetserver.asp.general.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> The sun never sets on
> the Kingdom of Heaven
> "Jacky Luk" <jl@.knight.com> wrote in message
> news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
>> Hi,
>> I have just installed IIS on my XP SP2 machine.
>> This code (dreamweaver) doesn't work
>>
>> <%@. LANGUAGE="VBSCRIPT"" %>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html>
>> <head>
>> <title>Untitled Document</title>
>> <meta http-equiv="Content-Type" content="text/html; charset=big5">
>> </head>
>> Good Afternoon<BR>
>> Welcome to this sample. It is approximately
>> <%=Time()%> at the server, Here
the current time ,Time(), is not displayed

>> <body>
>>
>> </body>
>> </html>
>>
>> pls help
>> Jack
>>
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> glsD:eiDp6EekFHA.1048@.tk2msftngp13.phx.g bl...
> First, define "doesn't work." Describe symptoms, behaviors, error
> messages, etc.
> Second, this is the ASP.Net newsgroup. You want the ASP newsgroup,
> microsoft.public.inetserver.asp.general.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> The sun never sets on
> the Kingdom of Heaven
> "Jacky Luk" <jl@.knight.com> wrote in message
> news:O7qvwDbkFHA.3968@.tk2msftngp13.phx.gbl...
>> Hi,
>> I have just installed IIS on my XP SP2 machine.
>> This code (dreamweaver) doesn't work
>>
>> <%@. LANGUAGE="VBSCRIPT"" %>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html>
>> <head>
>> <title>Untitled Document</title>
>> <meta http-equiv="Content-Type" content="text/html; charset=big5">
>> </head>
>> Good Afternoon<BR>
>> Welcome to this sample. It is approximately
>> <%=Time()%> at the server, Here
the current time ,Time(), is not displayed

>> <body>
>>
>> </body>
>> </html>
>>
>> pls help
>> Jack
>>
Jacky as ken Adviced this is ASP.NET newsgroup.
To display your time use:-
<%=Now()%>
Hope that helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Jacky as ken Adviced this is ASP.NET newsgroup.
To display your time use:-
<%=Now()%>
Hope that helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***

newbie class problem

Hi
Sorry to hassle you all again...

Still stuggling with classes. Heres the problem:

I have an aspx code with the following:


<%@dotnet.itags.org. Page Language="VB" src="http://pics.10026.com/?src=photogranny_connections.vb" inherits="Peter" %>
<script runat="server">
dim SQL as string = "SELECT * FROM [images] Order by ID asc"
dim Referrer as string ="OpenDS"
connectionStr(SQL,Referrer)
</script>
<html>...etc

and then I have the class as below


imports system
imports System.Data
imports System.Data.ODBC
imports System.Web.HttpContext
imports System.Web.UI.Page
imports system.web.UI

Public Class Peter
Inherits Page

Sub connectionStr(SQL as string,referrer as string)
-->logic here
End Sub

End Class

however, When I try and call the sub I get 'declaration expected'. Its referring to connectionStr. Its as if it can't see the sub. Iver tried making it a public sub but no joy. The .vb file is in the same directory as the other page.

Thanks for your help
PeterWhen you create a class, you must initialize an object of that class before using it.

MyClass obj = New MyClass
obj.MethodName1("...")

regards
thanks. is this the same for a codebehind file. If I just change the page directive to codebehind="filename" how then do I call the individual subs?

Thanks
Well its the same thing.

regards