我正在使用VB.NET中的MVC3开发一个Web应用程序.
我在使用以下操作链接在webgrid上设置列时遇到困难
编辑| 细节| 删除
@*@Html.ActionLink("Edit", "Edit", New With {.id = currentItem.PrimaryKey}) |
@Html.ActionLink("Details", "Details", New With {.id = currentItem.PrimaryKey}) |
@Html.ActionLink("Delete", "Delete", New With {.id = currentItem.PrimaryKey})*@
Run Code Online (Sandbox Code Playgroud)
我试过使用下面的语法,但我得到一个错误,其中未声明项目.
grid.Column(header:="",format:=(item)=> item.GetSelectLink("Custom Text"))
如何引用webgrid中的当前行或项目以使其工作?
任何帮助非常感谢.
问候
詹姆士
我有一个ASP.NET应用程序,允许用户每月将员工的缺席导出到Microsoft Excel.该应用程序当前正在生成以下异常
例外:无法创建ActiveX组件.
使用以下堆栈跟踪
System.Exception:无法创建ActiveX组件.位于H.\Development\pagec\Visual Studio 2005\Projects\HR\ysnet2\Time\ManagerSummary.aspx.vb中HR.ManagerSummary.ExportToExcel()的Microsoft.VisualBasic.Interaction.CreateObject(String ProgId,String ServerName):line 935 at HR.ManagerSummary.btnExcel_Click(Object sender,EventArgs e)位于H:\ Development\pagec\Visual Studio 2005\Projects\HR\ysnet2\Time\ManagerSummary.aspx.vb:第891行,位于System.Web.UI.WebControls .Button.OnClick(EventArgs e)System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)at System System.Web.UI.Page.ProcessRequestMain的System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)中的.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,String eventArgument)(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)
代码在CreateObject行失败.
'Create the Excel object
Dim objXL As Object = CreateObject("Excel.Application") ' New Microsoft.Office.Interop.Excel.Application
Dim objWB As Object = objXL.Workbooks.Add
Dim objWS As Object = objWB.Worksheets(1)
Run Code Online (Sandbox Code Playgroud)
我在IOMR_帐户的DCOM Config for Microsoft Excel Application中设置了权限,但是没有解决问题.任何想法将不胜感激.
干杯
詹姆士