0
누군가가 텍스트 박스에 숫자를 입력하고 데이타베이스에서 비율을 끌어 당기고 계산을 클릭 할 때 데이타베이스 (금융 요금)에 링크해야합니다. 'form message'. 코드를 데이터베이스에 연결하려면 homecontroller/index에 무엇을 넣어야합니까?계산 단추 누르기 - 데이타베이스에서 비율을 찾아 내기
Index.aspx :
<td>You wish to convert:
<input type="text" name="amount" size="30" onblur="test_ifinteger(Index.amount,'amounts')"/>
<input type="submit" name="submitter" value="calculate" />
<tr><td colspan="2">That will produce:<%=ViewData["formmessage"] %></td></tr>
홈 컨트롤러 :이 같은 양식에 필드를 감싸는 것
public ActionResult Index()
{
financeInit();
if (Request.Params["submitter"] == "calculate")
calculatepressed();
return View();
public void calculatepressed()
{
.............
}