Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > asp.net code not displaying results

Reply
Thread Tools

asp.net code not displaying results

 
 
Kevin Hanken
Guest
Posts: n/a
 
      08-17-2006
Hi,

Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2.

I installed IIS, set up a virtual directory, created an aspx file and pasted
in a little code from the w3schools site and then tried viewing the page
using my localhost.

The aspx page loads, but the little aspnet script asking to write the NOW
function -- won't display. Since I copied it from w3schools, I am assuming
it is syntactically correct.

Before sending this off -- I just saved the file as an ASP file and tried
displaying it -- and it works.

Can anyone clarify where my grief is?

thanks,
Kevin


 
Reply With Quote
 
 
 
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-17-2006
The script you took - is it an ASP script. or an ASP.NET script?

I suspect it is an ASP script, which means it won't necessarily work in
ASP.NET, since ASP.NET has a different syntax, different set of libraries,
etc.

I would forget trying to copy things off the web, and start off with
learning the basics about .NET and ASP.NET, and starting off slowly before
jumping right in.

"Kevin Hanken" <(E-Mail Removed)> wrote in message
news:eCy2%(E-Mail Removed)...
> Hi,
>
> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack
> 2.
>
> I installed IIS, set up a virtual directory, created an aspx file and
> pasted in a little code from the w3schools site and then tried viewing the
> page using my localhost.
>
> The aspx page loads, but the little aspnet script asking to write the NOW
> function -- won't display. Since I copied it from w3schools, I am assuming
> it is syntactically correct.
>
> Before sending this off -- I just saved the file as an ASP file and tried
> displaying it -- and it works.
>
> Can anyone clarify where my grief is?
>
> thanks,
> Kevin
>



 
Reply With Quote
 
 
 
 
Kevin
Guest
Posts: n/a
 
      08-17-2006
Well, i am not sure how much more basic I can get. Here is the complex code
I copied and pasted --

<%Response.Write(now())%>

and the w3schools site sez it it is asp.net compatibile -- and in fact they
provide a link to display this powerful piece of code -- and it displays.

So thanks for your help.





"Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
news:%23snk$(E-Mail Removed)...
> The script you took - is it an ASP script. or an ASP.NET script?
>
> I suspect it is an ASP script, which means it won't necessarily work in
> ASP.NET, since ASP.NET has a different syntax, different set of libraries,
> etc.
>
> I would forget trying to copy things off the web, and start off with
> learning the basics about .NET and ASP.NET, and starting off slowly before
> jumping right in.
>
> "Kevin Hanken" <(E-Mail Removed)> wrote in message
> news:eCy2%(E-Mail Removed)...
>> Hi,
>>
>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack
>> 2.
>>
>> I installed IIS, set up a virtual directory, created an aspx file and
>> pasted in a little code from the w3schools site and then tried viewing
>> the page using my localhost.
>>
>> The aspx page loads, but the little aspnet script asking to write the NOW
>> function -- won't display. Since I copied it from w3schools, I am
>> assuming it is syntactically correct.
>>
>> Before sending this off -- I just saved the file as an ASP file and tried
>> displaying it -- and it works.
>>
>> Can anyone clarify where my grief is?
>>
>> thanks,
>> Kevin
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-17-2006
Did you install either the 1.1 or the 2.0 .Net Framework ?

That code won't run unless the .Net Framework is installed.


You can download the free .Net Framework 2.0 redistributable at :
http://www.microsoft.com/downloads/d...DisplayLang=en

And you can download, free, the .Net Framework 2.0 SDK at :
http://www.microsoft.com/downloads/d...displaylang=en

If you install 2.0, you can use the free VWD Express 2005 to write your apps:
http://msdn.microsoft.com/vstudio/express/vwd/

If you want to start with 1.1, the redistributable is here :
http://www.microsoft.com/downloads/d...displaylang=en

And the SDK is here :
http://www.microsoft.com/downloads/d...displaylang=en

If you install 1.1, make sure you also install the .Net Framework's SP1 :
http://www.microsoft.com/downloads/d...displaylang=en

....and the Security Update for SP1 :
http://www.microsoft.com/downloads/d...displaylang=en

You can't develop for the 1.1 Framework with Visual Web Developer Express 2005, though.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================

"Kevin" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
> Well, i am not sure how much more basic I can get. Here is the complex code I copied and pasted --
>
> <%Response.Write(now())%>
>
> and the w3schools site sez it it is asp.net compatibile -- and in fact they provide a link to
> display this powerful piece of code -- and it displays.
>
> So thanks for your help.
>
>
>
>
>
> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
> news:%23snk$(E-Mail Removed)...
>> The script you took - is it an ASP script. or an ASP.NET script?
>>
>> I suspect it is an ASP script, which means it won't necessarily work in ASP.NET, since ASP.NET
>> has a different syntax, different set of libraries, etc.
>>
>> I would forget trying to copy things off the web, and start off with learning the basics about
>> .NET and ASP.NET, and starting off slowly before jumping right in.
>>
>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>> news:eCy2%(E-Mail Removed)...
>>> Hi,
>>>
>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2.
>>>
>>> I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code
>>> from the w3schools site and then tried viewing the page using my localhost.
>>>
>>> The aspx page loads, but the little aspnet script asking to write the NOW function -- won't
>>> display. Since I copied it from w3schools, I am assuming it is syntactically correct.
>>>
>>> Before sending this off -- I just saved the file as an ASP file and tried displaying it -- and
>>> it works.
>>>
>>> Can anyone clarify where my grief is?
>>>
>>> thanks,
>>> Kevin
>>>

>>
>>

>
>



 
Reply With Quote
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-17-2006
I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
namespace. It's not in the core framework namespace which all start with
System.

You should use DateTime.Now if you want to get the current date/time. Call
the ToString method on it, to get it in string format for Response.Write.

You should avoid using all those old functions in generals, there is always
a way to do it that is more portable across languages. For example, C#
wouldn't reference Microsoft.VisualBasic by default.

If there are no syntax errors on the ASP.NET page, then I would assume that
NOW is supported just fine there, so I would make sure the ASP.NET is
properly installed, etc.

Call Response.Write and give it "test" as the argument. If you still see
blank, the problem would with the configuration of ASP.NET.

"Kevin" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Well, i am not sure how much more basic I can get. Here is the complex
> code I copied and pasted --
>
> <%Response.Write(now())%>
>
> and the w3schools site sez it it is asp.net compatibile -- and in fact
> they provide a link to display this powerful piece of code -- and it
> displays.
>
> So thanks for your help.
>
>
>
>
>
> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
> news:%23snk$(E-Mail Removed)...
>> The script you took - is it an ASP script. or an ASP.NET script?
>>
>> I suspect it is an ASP script, which means it won't necessarily work in
>> ASP.NET, since ASP.NET has a different syntax, different set of
>> libraries, etc.
>>
>> I would forget trying to copy things off the web, and start off with
>> learning the basics about .NET and ASP.NET, and starting off slowly
>> before jumping right in.
>>
>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>> news:eCy2%(E-Mail Removed)...
>>> Hi,
>>>
>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack
>>> 2.
>>>
>>> I installed IIS, set up a virtual directory, created an aspx file and
>>> pasted in a little code from the w3schools site and then tried viewing
>>> the page using my localhost.
>>>
>>> The aspx page loads, but the little aspnet script asking to write the
>>> NOW function -- won't display. Since I copied it from w3schools, I am
>>> assuming it is syntactically correct.
>>>
>>> Before sending this off -- I just saved the file as an ASP file and
>>> tried displaying it -- and it works.
>>>
>>> Can anyone clarify where my grief is?
>>>
>>> thanks,
>>> Kevin
>>>

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-17-2006
re:
>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic namespace. It's not in the
>core framework namespace which all start with System.


<%Response.Write(now())%> should compile without importing Microsoft.VisualBasic.

See a working example at : http://asp.net.do/test/DateTime.aspx

I don't think Kevin installed a .Net Framework version at all,
or if he did install it, he's got a bad install.



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic namespace. It's not in the
>core framework namespace which all start with System.
>
> You should use DateTime.Now if you want to get the current date/time. Call the ToString method on
> it, to get it in string format for Response.Write.
>
> You should avoid using all those old functions in generals, there is always a way to do it that is
> more portable across languages. For example, C# wouldn't reference Microsoft.VisualBasic by
> default.
>
> If there are no syntax errors on the ASP.NET page, then I would assume that NOW is supported just
> fine there, so I would make sure the ASP.NET is properly installed, etc.
>
> Call Response.Write and give it "test" as the argument. If you still see blank, the problem would
> with the configuration of ASP.NET.


> "Kevin" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
>> Well, i am not sure how much more basic I can get. Here is the complex code I copied and
>> pasted --
>>
>> <%Response.Write(now())%>
>>
>> and the w3schools site sez it it is asp.net compatibile -- and in fact they provide a link to
>> display this powerful piece of code -- and it displays.
>>
>> So thanks for your help.
>>
>>
>>
>>
>>
>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>> news:%23snk$(E-Mail Removed)...
>>> The script you took - is it an ASP script. or an ASP.NET script?
>>>
>>> I suspect it is an ASP script, which means it won't necessarily work in ASP.NET, since ASP.NET
>>> has a different syntax, different set of libraries, etc.
>>>
>>> I would forget trying to copy things off the web, and start off with learning the basics about
>>> .NET and ASP.NET, and starting off slowly before jumping right in.
>>>
>>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>>> news:eCy2%(E-Mail Removed)...
>>>> Hi,
>>>>
>>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2.
>>>>
>>>> I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code
>>>> from the w3schools site and then tried viewing the page using my localhost.
>>>>
>>>> The aspx page loads, but the little aspnet script asking to write the NOW function -- won't
>>>> display. Since I copied it from w3schools, I am assuming it is syntactically correct.
>>>>
>>>> Before sending this off -- I just saved the file as an ASP file and tried displaying it -- and
>>>> it works.
>>>>
>>>> Can anyone clarify where my grief is?
>>>>
>>>> thanks,
>>>> Kevin
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-17-2006
Right, I didn't say it shouldn't work. I pointed out that using those
functions isn't a good idea to begin with. This was just a comment with
regards to my opinion on good coding practices.

I ended my post with a recommendation at looking into making sure that
ASP.NET is property installed and configured.

"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> re:
>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
>>namespace. It's not in the core framework namespace which all start with
>>System.

>
> <%Response.Write(now())%> should compile without importing
> Microsoft.VisualBasic.
>
> See a working example at : http://asp.net.do/test/DateTime.aspx
>
> I don't think Kevin installed a .Net Framework version at all,
> or if he did install it, he's got a bad install.
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
>>namespace. It's not in the core framework namespace which all start with
>>System.
>>
>> You should use DateTime.Now if you want to get the current date/time.
>> Call the ToString method on it, to get it in string format for
>> Response.Write.
>>
>> You should avoid using all those old functions in generals, there is
>> always a way to do it that is more portable across languages. For
>> example, C# wouldn't reference Microsoft.VisualBasic by default.
>>
>> If there are no syntax errors on the ASP.NET page, then I would assume
>> that NOW is supported just fine there, so I would make sure the ASP.NET
>> is properly installed, etc.
>>
>> Call Response.Write and give it "test" as the argument. If you still see
>> blank, the problem would with the configuration of ASP.NET.

>
>> "Kevin" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Well, i am not sure how much more basic I can get. Here is the complex
>>> code I copied and pasted --
>>>
>>> <%Response.Write(now())%>
>>>
>>> and the w3schools site sez it it is asp.net compatibile -- and in fact
>>> they provide a link to display this powerful piece of code -- and it
>>> displays.
>>>
>>> So thanks for your help.
>>>
>>>
>>>
>>>
>>>
>>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>>> news:%23snk$(E-Mail Removed)...
>>>> The script you took - is it an ASP script. or an ASP.NET script?
>>>>
>>>> I suspect it is an ASP script, which means it won't necessarily work in
>>>> ASP.NET, since ASP.NET has a different syntax, different set of
>>>> libraries, etc.
>>>>
>>>> I would forget trying to copy things off the web, and start off with
>>>> learning the basics about .NET and ASP.NET, and starting off slowly
>>>> before jumping right in.
>>>>
>>>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>>>> news:eCy2%(E-Mail Removed)...
>>>>> Hi,
>>>>>
>>>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service
>>>>> Pack 2.
>>>>>
>>>>> I installed IIS, set up a virtual directory, created an aspx file and
>>>>> pasted in a little code from the w3schools site and then tried viewing
>>>>> the page using my localhost.
>>>>>
>>>>> The aspx page loads, but the little aspnet script asking to write the
>>>>> NOW function -- won't display. Since I copied it from w3schools, I am
>>>>> assuming it is syntactically correct.
>>>>>
>>>>> Before sending this off -- I just saved the file as an ASP file and
>>>>> tried displaying it -- and it works.
>>>>>
>>>>> Can anyone clarify where my grief is?
>>>>>
>>>>> thanks,
>>>>> Kevin
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-17-2006
Cool.

Just wanted to make sure we're on the same page.



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Right, I didn't say it shouldn't work. I pointed out that using those functions isn't a good idea
> to begin with. This was just a comment with regards to my opinion on good coding practices.
>
> I ended my post with a recommendation at looking into making sure that ASP.NET is property
> installed and configured.


> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> re:
>>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic namespace. It's not in
>>>the core framework namespace which all start with System.


>> <%Response.Write(now())%> should compile without importing Microsoft.VisualBasic.
>>
>> See a working example at : http://asp.net.do/test/DateTime.aspx
>>
>> I don't think Kevin installed a .Net Framework version at all,
>> or if he did install it, he's got a bad install.
>>
>>
>> Juan T. Llibre, asp.net MVP
>> ===================================
>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic namespace. It's not in
>>>the core framework namespace which all start with System.
>>>
>>> You should use DateTime.Now if you want to get the current date/time. Call the ToString method
>>> on it, to get it in string format for Response.Write.
>>>
>>> You should avoid using all those old functions in generals, there is always a way to do it that
>>> is more portable across languages. For example, C# wouldn't reference Microsoft.VisualBasic by
>>> default.
>>>
>>> If there are no syntax errors on the ASP.NET page, then I would assume that NOW is supported
>>> just fine there, so I would make sure the ASP.NET is properly installed, etc.
>>>
>>> Call Response.Write and give it "test" as the argument. If you still see blank, the problem
>>> would with the configuration of ASP.NET.

>>
>>> "Kevin" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
>>>> Well, i am not sure how much more basic I can get. Here is the complex code I copied and
>>>> pasted --
>>>>
>>>> <%Response.Write(now())%>
>>>>
>>>> and the w3schools site sez it it is asp.net compatibile -- and in fact they provide a link to
>>>> display this powerful piece of code -- and it displays.
>>>>
>>>> So thanks for your help.


>>>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>>>> news:%23snk$(E-Mail Removed)...
>>>>> The script you took - is it an ASP script. or an ASP.NET script?
>>>>>
>>>>> I suspect it is an ASP script, which means it won't necessarily work in ASP.NET, since ASP.NET
>>>>> has a different syntax, different set of libraries, etc.
>>>>>
>>>>> I would forget trying to copy things off the web, and start off with learning the basics about
>>>>> .NET and ASP.NET, and starting off slowly before jumping right in.
>>>>>
>>>>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>>>>> news:eCy2%(E-Mail Removed)...
>>>>>> Hi,
>>>>>>
>>>>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2.
>>>>>>
>>>>>> I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code
>>>>>> from the w3schools site and then tried viewing the page using my localhost.
>>>>>>
>>>>>> The aspx page loads, but the little aspnet script asking to write the NOW function -- won't
>>>>>> display. Since I copied it from w3schools, I am assuming it is syntactically correct.
>>>>>>
>>>>>> Before sending this off -- I just saved the file as an ASP file and tried displaying it --
>>>>>> and it works.
>>>>>>
>>>>>> Can anyone clarify where my grief is?
>>>>>>
>>>>>> thanks,
>>>>>> Kevin



 
Reply With Quote
 
Kevin
Guest
Posts: n/a
 
      08-17-2006
thanks everyone.

I searched google for info on how to determine if the framework is
installed -- and the page I located had me check the registry. By all
indications, I do have it installed -- atleast here is the reg key it
referenced:

HKEY_LOCAL_MACHINE/SOFTWARE/
MICROSOFT/.NETFramework/policy/v1.1

the 4322 key has a value of 3706-4322

Is there a way to determine a bad install or should I just look to
reinstall? And if you were me, would you go to the 2.0 ver.?

thanks again everyone.




I will look into uninstalling and reinstalling.

"Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Right, I didn't say it shouldn't work. I pointed out that using those
> functions isn't a good idea to begin with. This was just a comment with
> regards to my opinion on good coding practices.
>
> I ended my post with a recommendation at looking into making sure that
> ASP.NET is property installed and configured.
>
> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> re:
>>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
>>>namespace. It's not in the core framework namespace which all start with
>>>System.

>>
>> <%Response.Write(now())%> should compile without importing
>> Microsoft.VisualBasic.
>>
>> See a working example at : http://asp.net.do/test/DateTime.aspx
>>
>> I don't think Kevin installed a .Net Framework version at all,
>> or if he did install it, he's got a bad install.
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> aspnetfaq.com : http://www.aspnetfaq.com/
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>> ===================================
>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
>>>namespace. It's not in the core framework namespace which all start with
>>>System.
>>>
>>> You should use DateTime.Now if you want to get the current date/time.
>>> Call the ToString method on it, to get it in string format for
>>> Response.Write.
>>>
>>> You should avoid using all those old functions in generals, there is
>>> always a way to do it that is more portable across languages. For
>>> example, C# wouldn't reference Microsoft.VisualBasic by default.
>>>
>>> If there are no syntax errors on the ASP.NET page, then I would assume
>>> that NOW is supported just fine there, so I would make sure the ASP.NET
>>> is properly installed, etc.
>>>
>>> Call Response.Write and give it "test" as the argument. If you still see
>>> blank, the problem would with the configuration of ASP.NET.

>>
>>> "Kevin" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> Well, i am not sure how much more basic I can get. Here is the complex
>>>> code I copied and pasted --
>>>>
>>>> <%Response.Write(now())%>
>>>>
>>>> and the w3schools site sez it it is asp.net compatibile -- and in fact
>>>> they provide a link to display this powerful piece of code -- and it
>>>> displays.
>>>>
>>>> So thanks for your help.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>>>> news:%23snk$(E-Mail Removed)...
>>>>> The script you took - is it an ASP script. or an ASP.NET script?
>>>>>
>>>>> I suspect it is an ASP script, which means it won't necessarily work
>>>>> in ASP.NET, since ASP.NET has a different syntax, different set of
>>>>> libraries, etc.
>>>>>
>>>>> I would forget trying to copy things off the web, and start off with
>>>>> learning the basics about .NET and ASP.NET, and starting off slowly
>>>>> before jumping right in.
>>>>>
>>>>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>>>>> news:eCy2%(E-Mail Removed)...
>>>>>> Hi,
>>>>>>
>>>>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service
>>>>>> Pack 2.
>>>>>>
>>>>>> I installed IIS, set up a virtual directory, created an aspx file and
>>>>>> pasted in a little code from the w3schools site and then tried
>>>>>> viewing the page using my localhost.
>>>>>>
>>>>>> The aspx page loads, but the little aspnet script asking to write the
>>>>>> NOW function -- won't display. Since I copied it from w3schools, I am
>>>>>> assuming it is syntactically correct.
>>>>>>
>>>>>> Before sending this off -- I just saved the file as an ASP file and
>>>>>> tried displaying it -- and it works.
>>>>>>
>>>>>> Can anyone clarify where my grief is?
>>>>>>
>>>>>> thanks,
>>>>>> Kevin
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Kevin
Guest
Posts: n/a
 
      08-17-2006
Thanks for the advice. I will definitely keep it in mind.

Right now all I really am trying to do is make sure I am able to use this xp
machine to develop asp.net pages.

I have a 2000 machine at home and had no problems setting it up to do so. I
just took a new job and everything is xp, so I am trying to adjust and am
attempting to move from asp classic to the dotnet world.

Thanks Marina.

"Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I think NOW is a throwback to VB6, which is in the Microsoft.VisualBasic
>namespace. It's not in the core framework namespace which all start with
>System.
>
> You should use DateTime.Now if you want to get the current date/time. Call
> the ToString method on it, to get it in string format for Response.Write.
>
> You should avoid using all those old functions in generals, there is
> always a way to do it that is more portable across languages. For example,
> C# wouldn't reference Microsoft.VisualBasic by default.
>
> If there are no syntax errors on the ASP.NET page, then I would assume
> that NOW is supported just fine there, so I would make sure the ASP.NET is
> properly installed, etc.
>
> Call Response.Write and give it "test" as the argument. If you still see
> blank, the problem would with the configuration of ASP.NET.
>
> "Kevin" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Well, i am not sure how much more basic I can get. Here is the complex
>> code I copied and pasted --
>>
>> <%Response.Write(now())%>
>>
>> and the w3schools site sez it it is asp.net compatibile -- and in fact
>> they provide a link to display this powerful piece of code -- and it
>> displays.
>>
>> So thanks for your help.
>>
>>
>>
>>
>>
>> "Marina Levit [MVP]" <(E-Mail Removed)> wrote in message
>> news:%23snk$(E-Mail Removed)...
>>> The script you took - is it an ASP script. or an ASP.NET script?
>>>
>>> I suspect it is an ASP script, which means it won't necessarily work in
>>> ASP.NET, since ASP.NET has a different syntax, different set of
>>> libraries, etc.
>>>
>>> I would forget trying to copy things off the web, and start off with
>>> learning the basics about .NET and ASP.NET, and starting off slowly
>>> before jumping right in.
>>>
>>> "Kevin Hanken" <(E-Mail Removed)> wrote in message
>>> news:eCy2%(E-Mail Removed)...
>>>> Hi,
>>>>
>>>> Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service
>>>> Pack 2.
>>>>
>>>> I installed IIS, set up a virtual directory, created an aspx file and
>>>> pasted in a little code from the w3schools site and then tried viewing
>>>> the page using my localhost.
>>>>
>>>> The aspx page loads, but the little aspnet script asking to write the
>>>> NOW function -- won't display. Since I copied it from w3schools, I am
>>>> assuming it is syntactically correct.
>>>>
>>>> Before sending this off -- I just saved the file as an ASP file and
>>>> tried displaying it -- and it works.
>>>>
>>>> Can anyone clarify where my grief is?
>>>>
>>>> thanks,
>>>> Kevin
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying SQL Query Results Brad Baker ASP .Net 5 04-12-2006 10:57 AM
Displaying results from a sqldatasource without binding to an object Nick ASP .Net 0 02-28-2006 10:01 AM
Displaying results as "pages" of a JTable and sorting across all results ... Monique Y. Mudama Java 1 06-28-2005 01:01 AM
Displaying Stored Procedure results in a textbox =?Utf-8?B?bmVpbF9wYXQ=?= ASP .Net 1 03-04-2005 07:23 PM
displaying number of results found ??? Tim T ASP .Net 4 12-10-2003 04:25 AM



Advertisments