I'm trying to figure out how to create a form using asp. I found this code:
<!DOCTYPE html><html><head><meta charset="utf-8" /><title>Add a Movie</title></head><body><h1>Add a Movie</h1><form method="post"><fieldset><legend>Movie Information</legend><p><label for="title">Title:</label><input type="text" name="title" value="@Request.Form["title"]" /></p><p><label for="genre">Genre:</label><input type="text" name="genre" value="@Request.Form["genre"]" /></p><p><label for="year">Year:</label><input type="text" name="year" value="@Request.Form["year"]" /></p><p><input type="submit" name="buttonSubmit" value="Add Movie" /></p></fieldset></form></body></html>
And I'm trying to make it work but I'm getting issues. On the "for" keyword inside the labels, I'm getting "can not resolve id "assetId", which is what I put in there. Where is it looking for this assetId? What exactly is the for keyword and what does it expect there? I'm also getting an error on the "@Request". It says The name 'Request' does not exist in the current context. Cannot resolve symbol 'Request'. I was under the impression from the code that Request was some sort of keyword or something.
Here is what I've got right now:
<div><form method="post"><p><label for="assetId">Asset Id</label><input type="text" name="AssetId" value="@Request.Form["AssetId"]"/></p></form></div>