c# - How to use textbox and ViewBag value in controller method? -


@using (html.beginform("sendcode", "home", formmethod.post)) { <div class="selected">you selected:</div> <div class="sname">@viewbag.selectsong</div> <div class="enter" style="width:458px;height:37px; text-align:left;"> <div class="selected">enter mobile number</div> <div class="mobileno"> <div><div class="spann">+91</div><input name="mnumber" type="text" class="mobileinput"/></div></div>`enter code here` <div class="confirm"><input name="" type="button" class="confirmb"value="confirm"onclick="location.href='@url.action("getdetail", "home" )'/> </div> <div class="applicablee">* charges applicable per mobile operators</div> </div> } 

i want use textbox value , viewbag value on controller method has been defined below?

public string getdetail(string mnumber, string ssongname) {     string ss = mnumber;     string ss1 = ssongname;     return ss; } 

viewbag 1 way property

if want return value must define variable property of model pass model parameter action


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -