2011-05-02 36 views
0

是有人試圖使用jquery與vb.net,像使用jQuery與vb.net

if InvalidUser() then show ModalDialog 
or if CreateNewUserForm.Confirm()=true then do some thing... 

感謝名單

回答

1

我的猜測是,你要執行JavaScript函數。如果這樣使用ScriptManager.RegisterStartupScript

public static void RegisterStartupScript(
    Control control, 
    Type type, 
    string key, 
    string script, 
    bool addScriptTags 
) 
0

我不認爲你真的明白你在問什麼。 jQuery(或Javascript)是客戶端技術,在瀏覽器中執行。 ASP.NET(使用VB.NET或C#)是服務器端語言,它在服務器上執行。

您不能將兩者結合起來,因爲它們在物理上不同的機器上執行。

現在,有很多方法來處理應用程序的兩個組件之間的通信,例如BrunoLM給出的示例,但您必須更具體以獲得具體答案。

+0

而在任何人喋喋不休之前,是的,我知道Javascript可以在服務器上執行。 – roryf 2011-05-02 10:52:57