|
Rank: Member Groups: Member
Joined: 12/15/2008 Posts: 21
|
I am struggling to find some example that simply does this:
1. pop up a dialog with 2 checkboxes...that i got (content and footer template) 2. when i click a checkbox then "ok" i am able to capture that event somehow and postback something like this:
Sub Dialog_CaptureClose(???) dim mycheckbox=me.dialog1.findcontrol("checkbox1") dim myresults=checkbox1.text 'do some stuff server side
is there any way you can complete the sample (content and footer template) with processing the results of the dialog actions?
i am very uncomfortable with java script and need to have a complete sample to get the idea...also have no clue what setting the acceptbutton to a control is supposed to do...if you wouldnt mind just showing me the whole thing.
thanks for your help
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, If you just want to handle the click event, you can set the CheckBox's AutoPostBack to true. That should post back the page for you when you click it. You can then handle the CheckBox's CheckedChanged event. Note this part has nothing to do with the dialog or JavaScript. It will be something like this:
Code: HTML/ASPX
<asp:CheckBox runat="server"
id="CheckBox1" OnCheckedChanged="YourHandler" Text="Test" />
Code: Visual Basic.NET
Protected Sub YourHandler(sender As Object, e As System.EventArgs)
Dim checkbox as CheckBox = CType(sender, CheckBox)
'do whatever you would like to do here
End Sub
Whenever the page post back, the dialog will close. If that is not the intended behavior, you can place the CheckBox inside an ASP.NET AJAX UpdatePanel or a CallbackPanel. UpdatePanel is provided by ASP.NET, while CallbackPanel is one of our controls, but they work in a similar way. If you do not wish to use those and do not care about full page reload, you can also set the dialog's InitialState on the server to Visible to re-display the dialog. Hope this helps. Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/15/2008 Posts: 21
|
Thanks that worked.
another question: sorry ;-)
if i wanted a server control button open the dialog could i do that also instead of having <p> <a href="javascript:eo_GetObject('Dialog1').show(true);">Show Modal</a> </p>
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
I believe our previous reply has already answered this question. You will need to set the dialog's InitialState property to EO.Web.DialogState.Visible for that.
|
|
Rank: Member Groups: Member
Joined: 12/15/2008 Posts: 21
|
i think i was not clear on the last question..
basically i want to open the dialog by clicking on a linkbutton (or button) that is a server control...i.e. i drop from the control from the toolbox onto the web form.
trying to get away from this to open the dialog: <p> <a href="javascript:eo_GetObject('Dialog1').show(true);">OPEN THIS DIALOG</a> </p
i use VB .net btw as well
thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, I believe we got your question correctly. We are not talking about JavaScript at all. You have a LinkButton and when you click it, it fires your LinkButton's server side event handler, inside your event handler you set the dialog's InitialState property. All happens on the server side. If this still does not look clear to you, you may wish to seek help from other resource. These are very basic ASP.NET programming issues that are unfortunately beyond the scope of our support. We do expect you to know those in order to use our product. You can review our official support policy at here: http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1368Thanks
|
|
Rank: Member Groups: Member
Joined: 12/15/2008 Posts: 21
|
my bad, i see now what you are talking about.
thanks
|
|