DCSIMG
Code Snippet RW (Response.Write) - Gilad Lavian's Blog

Gilad Lavian's Blog

In Development

Code Snippet RW (Response.Write)

Code Snippet For Response.Write

 

Ok, this code snippet must be the oldest trick in the book, but still I think it will help to developers how doesn't know about it.

 

1. Create a file name rw.snippet

2. Copy this XML code and save it.

3. From the tools menu in VS, select "Code Snippets manager".

4. Select import, and point it to the saved file.

5. To use the snippet write rw in the code editor.

6. Enjoy!

 

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>rw</Title>
            <Shortcut>rw</Shortcut>
            <Description>Code snippet for Response.Write</Description>
            <Author>Gilad Lavian</Author>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Code Language="csharp"><![CDATA[Response.Write($end$);]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

תוכן התגובה

Justin-Josef Angel [MVP] כתב/ה:

Isn't this a huge code smell that you've got a Response.Write snippet?

What's the use case for writing so many Response.Write statements?

# May 5, 2008 6:00 PM

Gilad Lavian כתב/ה:

I find this very useful in many cases, especially on debugging, and you should use Response.Write as many times you need to use in your code.

Guess you smell wrong :-)

# May 6, 2008 10:54 AM
שלח תגובה

(שדה חובה)  

(שדה חובה)  

(אופציונלי)

(שדה חובה) 

Please add 1 and 8 and type the answer here:


Enter the numbers above: