Monday, 28 April 2014

Validation for enter key and double quot



Validation for enter key and double quot;

FilteredTextBoxExtender3.ValidChars = FilteredTextBoxExtender3.ValidChars + "\r\n";

<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server"
                                FilterType="Custom, Numbers, UppercaseLetters, LowercaseLetters" ValidChars=" !@#$%&(),./= +&quot;"  TargetControlID="txtMessage"> </cc1:FilteredTextBoxExtender>

Friday, 11 April 2014

Multiple element drag and drop

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

  <meta charset="utf-8">
  <title>jQuery UI Sortable - Connect lists</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <style>
  #sortable1, #sortable2 , #sortable3{ list-style-type: none; margin: 0; padding: 0 0 2.5em; float: left; margin-right: 10px; }
  #sortable1 li, #sortable2 li , #sortable3 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
  </style>
  <script>
      $(function () {
          $("#sortable1, #sortable2 , #sortable3").sortable({
              connectWith: ".connectedSortable"
          }).disableSelection();
      });
  </script>
</head>



<body>

<ul id="sortable1" class="connectedSortable">
  <li class="ui-state-default">Item 1</li>
  <li class="ui-state-default">Item 2</li>
  <li class="ui-state-default">Item 3</li>
  <li class="ui-state-default">Item 4</li>
  <li class="ui-state-default">Item 5</li>
</ul>

<ul id="sortable2" class="connectedSortable">
  <li class="ui-state-highlight">Item 1</li>
  <li class="ui-state-highlight">Item 2</li>
  <li class="ui-state-highlight">Item 3</li>
  <li class="ui-state-highlight">Item 4</li>
  <li class="ui-state-highlight">Item 5</li>
</ul>

 <ul id="sortable3" class="connectedSortable">
  <li class="ui-state-highlight">Item 1</li>
  <li class="ui-state-highlight">Item 2</li>
  <li class="ui-state-highlight">Item 3</li>
  <li class="ui-state-highlight">Item 4</li>
  <li class="ui-state-highlight">Item 5</li>
</ul>

</body>
</html>

Thursday, 10 April 2014

Date sorting in xsl

 <xsl:template match="node()|@*">
    <xsl:copy>
      <xsl:apply-templates select="node()|@*"/><br/>
    </xsl:copy>
  </xsl:template>



  <xsl:template match="INSTestElements">
    <xsl:copy>
   
      <xsl:apply-templates select="INSTestElement">
        <xsl:sort select="substring(substring-after(substring-after(Created, '/'), '/'), 1, 4)" data-type="number" order="descending"/>
        <xsl:sort select="substring(Created, 1, 2)" data-type="number" order="descending"/>
        <xsl:sort select="substring-before(substring-after(Created, '/'), '/')" data-type="number" order="descending"/>
   
      </xsl:apply-templates>
     
    </xsl:copy>
  </xsl:template>

Monday, 7 April 2014

For each for ary in xsl and xslt

 <xsl:variable name="k" select="@id" />
      <xsl:variable name="list" select="'4 5 6'" />
   
     <xsl:if test="
  contains(
    concat(' ', $list, ' '),
    concat(' ', $k, ' ')
  )
">
      hanmant <xsl:value-of select="concat('ID- ', $k, ' is in the list.')" />
      </xsl:if>