Click here to Skip to main content
15,924,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,



I am trying to build my project in ASP .NET, I use CSHTML to build complete website.


HTML
<form>
<input type="text" id="ip1">
<input type="button" text="ok" id="btn1">
</form>



I have seperate CSharp file also.

such.

C#
public static string md5operation(string ip)
{
---
--
--

return md5op;
}



How to get text input from CSHTML file and to perform operation in CSHARP methods and again i should print that value in CSHTML file.



Plese help me.
Posted

1 solution

in asp.net in order to access the controls in codebehind u should have runat="server" in controls.
it is better to use asp.net control instead of html control
why you want to use html control instead of asp.net control
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900