Thursday, May 8, 2014

helper method in mvc4

 @helper Img(string picName, string alt ){
        string root = "/Images/";
      string imgurl = root + picName;
      <img  alt="@alt" src="@imgurl" title="@alt" />

 }
  @Img("pp.jpg","yyut")

No comments:

Post a Comment