Shahin
Shahin

Reputation: 12843

Open Jquery Dialog Server Side

Is it available to open jquery Dialog Server Side From Behind Code in asp.net? Please give me an example or a link for more information. thanks.

Upvotes: 1

Views: 2116

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

You could use the RegisterStartupScript method from the code behind:

public void SomeButton_Click(Object sender, EventArgs e)
{
    string script = "$('#someid').dialog('open');";
    ClientScript.RegisterStartupScript(GetType(), "popup", script, true);
}

But mixing javascript and c# code is a very clean approach. It would be better to simply open the dialog from javascript on the client.

Upvotes: 2

Related Questions