Tuesday, 31 January 2012

jqueryPost !!!!!!!!!!!!!!!!!!!!!

1 Step:

 <asp:DropDownList ID="ddlTypeStyles" runat="server" onchange="funcUpdateVerseFontSize();">
                                                <asp:ListItem Value="GEBookerRegular">Booker</asp:ListItem>
                                                <asp:ListItem Value="GEOpticalRegular">Optical</asp:ListItem>
                                                <asp:ListItem Value="GEPalladianRegular" Selected="true">Palladian</asp:ListItem>
                                                <asp:ListItem Value="GESultanRegular">Sultan</asp:ListItem>                                             
                                            </asp:DropDownList>


<div id="divVerseFontSize" style="padding-right: 30px; float: right">
                                                <asp:DropDownList runat="server" ID="ddlVerseFontSize">
                                                </asp:DropDownList>
                                            </div>




2st step

 function funcUpdateVerseFontSize() {
                $(document).ready(function () {
                    var MessageTypeStyle = $("#<%=ddlTypeStyles.ClientID %>").val();
                    var qscardid = <%= qscardid %>;
                    var qsquantity = <%= qsquantity %>;
                    $.post("customizecard.aspx?CardID="+ qscardid +"&Quantity="+qsquantity, { FontStyle: MessageTypeStyle, operationType: 'refreshversefontsize' },
                                     function (data) {
                                         $(document).ready(function () {
                                             var content = $(data).find('#divVerseFontSize');                                                                                  
                                             $("div#divVerseFontSize").html(content);
                                             $("div#divVerseFontSize").css("padding-right","15px");
                                             $("div#divVerseFontSize").css("float","right");
                                         });
                                     });
                });
            }

3 step :

If Me.Master.Request.Form("operationType") IsNot Nothing Then
            If String.IsNullOrEmpty(Me.Master.Request.Form("operationType").ToLower()) = False Then
                If Me.Master.Request.Form("operationType").ToLower() = "refreshversefontsize" Then
                    If Me.Master.Request.Form("FontStyle") IsNot Nothing Then
                        If String.IsNullOrEmpty(Me.Master.Request.Form("FontStyle").ToLower()) = False Then
                            Dim VerseFontStyle As String = Me.Master.Request.Form("FontStyle")
                            FillVerseddlFontSize(VerseFontStyle)
                        End If
                    End If
      End If