我正在处理控制台应用程序,它获取一些数据并调用MVC3 Action方法并将获取的数据作为参数传递给该操作方法.但我的问题是控制台应用程序如何知道数据成功传递\ MVC操作方法正确调用并且服务器上的mvc应用程序正在运行
这是我的代码:
public static void Main()
{
// Mvc application object intialization
HomeController object_Mail = new HomeController();
// Mvc action method call
object_Mail.mailgateway(mvcemails); //mvcemails parameter passed to Actionmethod
}
Run Code Online (Sandbox Code Playgroud)
请指导我......
谢谢,拉吉
这是我的代码
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow) {
// DataRow data = ((DataRowView)e.Row.DataItem).Row;
string ToolTipString = Convert.ToString(e.Row.Cells[2].Text);
e.Row.Cells[2].Attributes.Add("title", ToolTipString);
Label MyLabel = (Label)e.Row.FindControl("MyLabel");
if (ToolTipString.Length < 20) {
MyLabel.Text = ToolTipString;
}
else {
MyLabel.Text = String.Format("{0}...", ToolTipString.Substring(0, 17));
MyLabel.ToolTip = ToolTipString;
}
}
}
Run Code Online (Sandbox Code Playgroud)
但Convert.ToString(e.Row.Cells[2].Text);这里总是给我“”。我的代码有什么问题吗?