asp.net mvc - getting value of input text from html to mvc -


i have textbox containing url. in html looks this:

<input id="bannerlink1" name="bannerlink1" type="text" value="@viewbag.baner1_link" /> 

i'm trying value controller using request object:

baner.url_link = request["bannerlink1"]; 

but controller see request["bannerlink1"] empty string. guesses can wrong?

you need put input-tag inside form tags (html.beginform()) put value when form posts.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -