0

is some one try to use jquery with vb.net, like

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

Thanx

2 Answers 2

1

My guess is that you want to execute a javascript function. If so use ScriptManager.RegisterStartupScript

public static void RegisterStartupScript(
    Control control,
    Type type,
    string key,
    string script,
    bool addScriptTags
)
Sign up to request clarification or add additional context in comments.

Comments

0

I don't think you truly understand what it is you're asking. jQuery (or Javascript) is a client-side technology that executes in the browser. ASP.NET (using VB.NET or C#) is a server-side language that executes on the server.

You cannot combine the two as in your example given that they execute on physically different machines.

Now, there are numerous ways to handle communication between the two components of your application, such as the example given by BrunoLM, but you'd have to be more specific to get a concrete answer.

1 Comment

And before anyone whines about it, yes I know Javascript can execute on the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.