# Basic ASP.NET Question

**URL:** https://boards.straightdope.com/t/basic-asp-net-question/353099
**Category:** Factual Questions
**Created:** [April 18, 2006, 12:53am UTC](https://boards.straightdope.com/t/basic-asp-net-question/353099 "2006-04-18T00:53:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ice1000](https://avatars.discourse-cdn.com/v4/letter/i/a3d4f5/32.png) [@ice1000](https://boards.straightdope.com/u/ice1000)
#### Post date: [April 18, 2006, 12:53am UTC](https://boards.straightdope.com/t/basic-asp-net-question/353099/1 "2006-04-18T00:53:50Z")

</div>

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?

😕

---

<div class="post-metadata">

### Author: ![Khadaji](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@Khadaji](https://boards.straightdope.com/u/Khadaji)
#### Post date: [April 18, 2006, 1:00am UTC](https://boards.straightdope.com/t/basic-asp-net-question/353099/2 "2006-04-18T01:00:32Z")

</div>

> [@ice1000](#):
>
> 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?
> 
> 😕

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.

---

<div class="post-metadata">

### Author: ![ice1000](https://avatars.discourse-cdn.com/v4/letter/i/a3d4f5/32.png) [@ice1000](https://boards.straightdope.com/u/ice1000)
#### Post date: [April 18, 2006, 1:16am UTC](https://boards.straightdope.com/t/basic-asp-net-question/353099/3 "2006-04-18T01:16:13Z")

</div>

> [@Khadaji](#):
>
> 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!
