Home Search Member List Faq Register Login  
UltimateAjax
How do we set this up

Thread Starter: Jackxxx   Started: 11-04-2008 6:26 AM   Replies: 3
 Karamasoft Support Forums » General Discussions » UltimateAjax » How do we set this up
 Printable Version    « Previous Thread   Next Thread »
  04 Nov 2008, 6:26 AM
Jackxxx is not online. Last active: 4/14/2014 6:06:44 PM Jackxxx

Top 10 Posts
Joined on 10-15-2007
Posts 133
How do we set this up
We want to use the UltimateAjax so that when a user clicks a button it will load the editor. our button code is listed below.

We are not sure how to set this up, we have looked at your sample but don't completly see how it would work.

Please provide an simple example.

Do we wrap the button and editor in the UltimateAjax control? How do we call the code?

Thank You,


        Dim dtrSelectedLetter As SqlDataReader        Dim SelectSelectedLetter As String        Dim ConnectStr As String = _            ConfigurationManager.ConnectionStrings("2ConnectionString").ConnectionString        Dim Con As New SqlConnection(ConnectStr)        Try            Con.Open()            SelectSelectedLetter = "SELECT Letter FROM tblTemplates WHERE Template_ID =" & Me.lstLetters.SelectedValue            MyCommand = New SqlCommand(SelectSelectedLetter, Con)            dtrSelectedLetter = MyCommand.ExecuteReader()            If dtrSelectedLetter.HasRows Then                dtrSelectedLetter.Read()                Me.UltimateEditor1.EditorHtml = Server.HtmlDecode(dtrSelectedLetter.Item("Letter").ToString())                Me.txtLetterName.Text = Me.lstLetters.SelectedItem.Text            Else            End If            dtrSelectedLetter.Close()            Con.Close()        Catch ex As Exception            Response.Write(ex.Message)        Finally            Con.Close()        End Try
 



  
  04 Nov 2008, 5:46 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: How do we set this up

What your code basically does seems to be setting the EditorHtml property to the content you retrieve from your database. If you look at the sample code, you need to place your UltimateEditor control inside an UltimateAjax control as follows:

<cc1:UltimateAjax id="UltimateAjax1" runat="server">
   <cc2:UltimateEditor id="UltimateEditor1" runat="server"></cc2:UltimateEditor>
</cc1:UltimateAjax>

Then, you should define Callback event handler on your page code-behind (you can simply double-click on your UltimateAjax control in Visual Studio design view to generate the event handler automatically) and place your code to set the EditorHtml property inside it.

protected void UltimateAjax1_Callback(object sender, Karamasoft.WebControls.UltimateAjax.CallbackEventArgs e) {
   // Place your code here to set the EditorHtml property
}

Then, in your ASPX page, define a client-side event handler to trigger the AJAX callback as follows:

<input type="button" value="Start Callback" onclick="DoUltimateCallback('UltimateAjax1', '')">


  
  05 Nov 2008, 7:06 PM
Jackxxx is not online. Last active: 4/14/2014 6:06:44 PM Jackxxx

Top 10 Posts
Joined on 10-15-2007
Posts 133
Re: How do we set this up
We never recieved an email about the post. What would we do if we want to call the code when a user makes a selection from a dropdown control?

Thank you,

  
  05 Nov 2008, 9:32 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: How do we set this up
Please refer to the http://www.karamasoft.com/Samples.aspx?component=UltimateAjax&sample=DropDownList sample if you want to initiate a callback when the user changes a dropdown selection.
  
 Page 1 of 1 (4 items)
Karamasoft Support Forums » General Discussions » UltimateAjax » How do we set this up

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.