Skip to content

Escan-DNMZ/Html-Helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Html-Helpers

Html Helper

For değerlerini model ile kullanıldığı zaman kullanıyoruz DropDownListFor gibi

https://www.muratoner.net/aspnet/aspnet-mvc/aspnet-mvc-html-helper-elemanlari daha fazlası için burdaki makaleyi okuya bilirsiniz

Form

@using (Html.BeginForm("About","Home",FormMethod.Post)){
	<input type="text" name="isim"/>
	<input type="submit" value="Kaydet"/>
}
//Html versiyonu
<form action="/Home/About" method="Post">
	<input type="text" name="isim"/>
	<input type="submit" value="Kaydet"/>
</form>

CheckBox

@Html.CheckBox("hobi1",false) 
@Html.CheckBox("hobi2",false)
@Html.CheckBox("hobi3",false)
//Html versiyonu
<input type="checkbox" name="hobi1" value="hobi1"/>
<input type="checkbox" name="hobi2" value="hobi2"/>
<input type="checkbox" name="hobi3" value="hobi3""/>

DropDownList

@Html.DropDownList("Ogrenciler","Lütfen bir öğrenci seç")
//Html versiyonu
<label for="Ogrenciler">Lütfen bir öğrenci seç</label>
<select name="Ogrenciler" id="Ogrenciler">
  <option value="ogrenci1">ogrenci1</option>
  <option value="ogrenci2">ogrenci2</option>
  <option value="ogrenci3">ogrenci3</option>
  <option value="ogrenci4">ogrenci4</option>
</select>

TextArea

@Html.TextArea("aciklama","",new {@row = 5})
//Html versiyonu
<label>aciklama:</label>
<textarea name="aciklama" rows="4" cols="50">
Bu uzun bir açıklama metnidir
</textarea>

TextBox

@Html.TextBox("isim","",new {maxlength = 5})
//Html versiyonu
<input type="text" name="isim">

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published