我要調用從代碼behind.I事情我能夠從後面的代碼調用的HTML這樣的:如何在後臺代碼中編寫c#中的JavaScript函數?
它看起來像這樣
<h1>cubus outperform EV Analytics</h1>
<div style="margin:0px; position:absolute; top:12px; left:0px; bottom:0px; right:0px;" id="EVObject_xml">
<object id="EVObject" name="EVObject" lang="en-US"
width="100%" height="100%" CodeBase="http://kl12ACUC/EVServer/Client/Ctrl.cab#version=11,0,0,0"
ClassId="clsid:80AC1200-0BBE-499A-A9E9-5F334DBC8E89">
<param Name="Server" Value="kl12ACUC" />
<param Name="EnableTabBar" Value="True" />
<param Name="Theme" Value="Ribbon" />
</object>
</div>
<div id="ribbon" />
<div id="backstage-container" />
,現在它看起來像這樣的代碼
背後string strHTMLGrid = "";
strHTMLGrid = strHTMLGrid + "<h1>" + sHeading + "</h1>";
strHTMLGrid = strHTMLGrid + "<div id='EVObject_xml' style='margin: 0px; position: absolute; top: 12px; left: 0px; bottom: 0px; right: 0px; '>";
strHTMLGrid = strHTMLGrid + "<object name='EVObject' width='100%' height='100%' id='EVObject' codebase='" + sUrlHtml + "' lang='en-US' classid='clsid:80AC1200-0BBE-499A-A9E9-5F334DBC8E89'>";
strHTMLGrid = strHTMLGrid + "<param name='Server' value='" + sServername1 + "'>";
strHTMLGrid = strHTMLGrid + "<param name='Server' value='" + sTheme1 + "'>";
strHTMLGrid = strHTMLGrid + "<param name='Server' value='" + sHeading + "'>";
strHTMLGrid = strHTMLGrid + "</object>";
strHTMLGrid = strHTMLGrid + "</div>";
strHTMLGrid = strHTMLGrid + "<div id='ribbon'>";
strHTMLGrid = strHTMLGrid + "<div id='backstage - container'> </div>";
strHTMLGrid = strHTMLGrid + "</div>";
現在我需要調用的這個網站document.The代碼的身體負荷的JavaScript功能我也有我看起來像這樣
function OpenCube()
{
EVObject.Enable(UIAuthorisationType.UIAuthorisationToolbar, true);
EVObject.Enable(UIAuthorisationType.UIAuthorisationTabBar, true);
EVObject.TabBarPosition = TabBarPositionType.TabBarPositionBottom;
EVObject.Allow(ActionAuthorisationType.UIAuthorisationToolbarText, false);
EVObject.ToolBar.LargeButtons = false;
EVObject.Enable(UIAuthorisationType.UIAuthorisationLocalViews, false);
EVObject.Allow(ActionAuthorisationType.ActionAuthorisationDataEntry, false);
EVObject.Allow(ActionAuthorisationType.ActionAuthorisationSaveView, true);
EVObject.Allow(ActionAuthorisationType.ActionAuthorisationExport, true);
EVObject.Allow(ActionAuthorisationType.ActionAuthorisationExportToExcel, true);
EVObject.ViewLocations = "General=/";
EVObject.object.attachEvent("NeedDataSourceCredentials", DataSourceCredentials);
EVObject.object.attachEvent("NeedServerCredentials", ServerCredentials);
EVObject.Views.Open("/Outdb/mis");
LeaveBackstage();
ExpandRibbons(false);
ShowBackstage(false);
}
1)問題1 ====現在如何在C#中調用JavaScript函數。
2)問題2 =====如何調用Javascript函數,我寫了html文檔的正文的負載。
感謝名單中執行鍼對建議叫....哈米德我有辦法做到這一點......謝謝 –