Apostophe's in Click Handler AddTab

  1. #1

    Apostophe's in Click Handler AddTab

    Hi everyone,
    quick simple question. How can I do this?

    <Click Handler="addTab(#{CenterPanel}, 'idReportAptpuoApplicants', 'rptapplicants.aspx', 'Rapport demande d'emploi / Applicants Report');" />
    I get an error since I have an apostrophe in my last parameter between d and emploi. I tried doubling it up and that didn't work?

    Any suggestions please?

    Thanks
    Bert
  2. #2
    Hi Bert,

    You can escape the single quote (') with a backslash (\).

    Example

    <%@ Page Language="C#" %>
      
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html>
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
        
            <ext:Button 
                runat="server" 
                Text="Submit" 
                OnClientClick="Ext.Msg.alert('Message', 'Wasn\'t that a party?')" 
                />
        </form>
    </body>
    </html>
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Perfect, that's exactly what I was looking for.

    Thanks,
    Bert

Similar Threads

  1. Replies: 1
    Last Post: Jun 22, 2011, 12:56 PM
  2. Replies: 1
    Last Post: Mar 02, 2010, 10:53 AM
  3. click handler doesn't work
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Nov 17, 2009, 10:02 AM
  4. AjaxMethod handler on Image click?
    By dbassett74 in forum 1.x Help
    Replies: 0
    Last Post: May 11, 2009, 5:13 PM
  5. Click Handler problem
    By sz_146 in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 12:47 PM

Tags for this Thread

Posting Permissions