Thursday, March 22, 2012

newbie issue

Hi all,
I'm new to the concept of ASP programming but still "I'm not ignorant"...
I was working on a guest book, I've done everything, but I don't know how to save content of a textbox into file (Append).

P.S.
1- I'm using ASP .NET 2 VS 2005
2- The programming language is not a problem

Thanks in advancehttp://support.microsoft.com/default.aspx?scid=kb;EN-US;816149

But for a guestbook, why not use a database? Files are rather inefficient, but hey, it's your website.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;816149

But for a guestbook, why not use a database? Files are rather inefficient, but hey, it's your website.
The site doesn't contain anything about ASP
1. ASP.NET isn't a programming language, it is a technology. You still use a codebehind language such as VB.NET or C#.

2. The syntax will be just about the same for you in 2.0.

3. If you are viewing that page in Firefox, it is broken. Scroll down until you see the floating islands of code.
1. ASP.NET isn't a programming language, it is a technology. You still use a codebehind language such as VB.NET or C#.

I knew someone is gonna say that, so I said "I'm not ignorant" :p

2. The syntax will be just about the same for you in 2.0.

I don't understand what does this mean!

3. If you are viewing that page in Firefox, it is broken. Scroll down until you see the floating islands of code.

I'm using FF and I saw the code (what's a floating island? :confused: )

My problem is "I know how to write to a file, but how can I use a file in one of my web folders?"
Use a file... can you explain that?
It's very simple, I have a file that I use for read-write... (It contains Guests messages to read & new messages are appended to it)
The thing is, in what path should I store it so I can read from it and write to it without getting the "Access Denied" Exception
In regular VB I use the property Application.WorkingDirectory to get the current path, is there an equivalent in ASP?
Ideally, should be the same path as the asp.net application.

Use Server.Mappath().

0 comments:

Post a Comment