tags:

views:

168

answers:

1
+1  Q: 

jGrowl in asp.net

Hello there

I have to search a particular member and so as i write the member id in the textbox and click the search button, I want the message to be displayed "member not found"(if not found) in jgrowl otherwise it will be redirected to the memberId page.

Now the problem is when the button is clicked i write the details in button_click(c#) event about conn estd, redirect to member page if found etc. But what if not found? i.e how to provoke the JGrowl(which is in a javascript in asp.net)? how to call that?

I am confused regarding the wayI have to implement it. Would appreciate any kind of help.

Thanking You Indranil

P.S. After implementing the snippet

string js = "$.jGrowl('Hello world!');"; Page.ClientScript.RegisterStartupScript(typeof(string), "jgrowlwarn", js, true);

from Mr Gabriel the jGrowl works fine but it looks like this -> http://www.4shared.com/photo/vx7mKAnL/jGRowl.html any suggestions? FYI I've other jquery functions in the project.

A: 

Do this when the check failed to find the user: it depends if you are using AJAX (ScriptManager or not) if not:

string js = "$.jGrowl('Hello world!');";
Page.ClientScript.RegisterStartupScript(typeof(string), "jgrowlwarn", js, true);

if so:

string js = "$.jGrowl('Hello world!');";
ScriptManager.RegisterStartupScript(this, typeof(pageBase), "jgrowlwarn", js, true);
Gabriel Guimarães
AJAX Scriptmanager Iam just using for displaying a calender(textbox).Just to make sure- this code has to be written in C# right?
Indranil Mutsuddy
Bravo!! the first snippet works great...thanks a lot.Now there is another problem i am facing. The jGrowl has some blue block in it(there might be some conflict with the jquery, m using jquery too). si there any way to get the default(smoke) jGrowl?
Indranil Mutsuddy
Sorry I'm not familiar with jGrowl, can you explain what do you mean by blue block?
Gabriel Guimarães
i gave a link...do check the image here->http://www.4shared.com/photo/vx7mKAnL/jGRowl.html
Indranil Mutsuddy
it was a CSS problem...Thanks a lot for being there..PROBLEM SOLVED
Indranil Mutsuddy