Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

I am Jalpesh Vadgama a Microsoft MVP for Visual C# and BrainBench Certified ASP.NET Developer having more then 6 years of experience in .NET Technology.
Browse by Tags · View All
#ASP.NET 88
#DOTNET 87
BRH 79
ASP.NET 72
#.NET 52
C#.NET 48
DOTNET 47
ASP.NET 4.0 31
ASP.NET MVC 29
VisualStudio 27

Archive · View All
December 2010 16
July 2011 13
April 2011 13
April 2012 12
January 2011 12
June 2011 11
May 2011 11
May 2012 8
February 2013 7
January 2013 7

ASP.NET MVC Razor IsPost property with IF –Else loop

Dec 3 2010 1:59PM by Jalpesh   

ASP.NET MVC Razor a new view engine from Microsoft  looks very promising. Here are example of code where we can determine page is post back or not. It support a IsPost Property which will tell you whether page is post back or not. So based on that we can write code for handling post back.  Also one of greatest feature of razor is we can write code for decision making  like if else and other stuff with single @ statement isn’t that great stuff.

Here is the stuff how we can write the code with IsPost property.

@{
	   var Message="";
	   if(IsPost)
	   {
			Message ="This is from the postback";
	   }
	   else
	   {
			Message="This is without postback";
	   }
}

And we can now print that variable with following HTML Form.

<form method="POST" action="" >

<input type="Submit" name="Submit" value="Submit"/>
<p>@Message</p>
</form>

here submit button will submit the form and based on that it will print message. Let’s see how it looks in browser before post back and after post back.

WithoutPostback

And After post back

AfterPostaback

So that’s it. Now you can do lots of stuff with IsPost property possibilities are unlimited!!. Hope this will help you..Happy Programming.

Shout it

Tags: BRH, #DOTNET, #ASP.NET, ASP.NET, Razor, ASP.NET MVC, ViewEngine,


Jalpesh
15 · 11% · 3548
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]