Basic ASP.NET Question

Just getting used to VB .NET and the following statement has me puzzled:

Response.Output.Write(“Physical Path for page: {0}<br>”, mappath(“thisFile.aspx”))

If I take the {0} the output does not appear. Why is the {0} needed? Isn’t that an array? Why pass a 0 array to the write method?

:confused:

The zero indicates that it is the first parameter being passed into the formatting string of the *write *statement.

Try this:

Response.Output.Write(“Physical Path for page: {0} {1}<br>”, mappath(“thisFile.aspx”), “test”)

And compare the results.

Ahhh I see. So you have to tell the write statement how many parameters you are going to pass and then you specify them.

Got it.

Thanks!