I'm new to MVC but understand the concept and logic behind it, I created a version of my website in web forms but wanted to change it to MVC. I am having one issue which I'm having trouble finding a solution. My code in web forms is:
protected void CMD(object sender, EventArgs e)
{
SSH s = new SSH();
s.cmdInput = input.Text;
output.Text = s.SSHConnect();
}
All it is doing is taking the return of a class that outputs SSH data. I've tried using Viewbag
and Viewdata
but I obviously wasn't doing it right because it wouldn't output anything. Is there a way to do this?