Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi, I am trying to use the Dialog as a conditional news update for my users.
I need to place a bound checkbox within one of it's templates to update the database and depending on the condition in the database, show or not show the Dialog as soon as the relevant screen is loaded.
The database bit is fine but not sure how to load the Dialog conditionally. I would normally use codebehind with if/then statements but seeing as the Dialog uses javascript on a button click, I am lost as to how to get this to work.
I guess I need a javascript function to show/not show and then call it from behind depending on the condition but I am not sure how to do this or even if it's possible with the Dialog.
Code would be appreciated, I am using VB with ASP.Net 2.0 and Ajax
Thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would use this to show/hide the dialog:
'Show dialog Dialog1.InitialState = DialogState.Visible
'Hide dialog Dialog1.InitialState = DialogState.Hidden
Thanks
|
Rank: Advanced Member Groups: Member
Joined: 2/1/2008 Posts: 35
|
Hi, This does not work in codebehind, it throws an error Regards.
|