Match match = Regex.Match(origPath, @"([^/]*)/member/([^/]*)/([0-9]+)\.aspx$", RegexOptions.IgnoreCase); if (match.Success) { string pageID = match.Groups[3].Value; //Context.Response.Redirect("ViewMember.aspx?id=" + pageID); Context.RewritePath("../../ViewMember.aspx?id=" + pageID); }
Monday, December 31, 2012
regular expression rewrite path
regular expression trim
MemberName = System.Text.RegularExpressions.Regex.Replace(MemberName, "([^A-Za-z0-9()]$)", "");
PostBackUrl or CommandArgument
PostBackUrl='<%# string.Format("~/ViewMember.aspx?id={0}",Eval("MemID")) %>' OR CommandArgument='<%# Eval("MemID")+":"+ Eval("MemberName") %>'
Sunday, December 30, 2012
JSON Serialize
System.Web.Script.Serialization.JavaScriptSerializer javaScriptSerializer = new System.Web.Script.Serialization.JavaScriptSerializer(); string sJSON = javaScriptSerializer.Serialize(memberProfileslist); context.Response.Write(sJSON);
Thursday, December 13, 2012
Jquery FadeIn FadeOut from DataBase
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Loop through an array using jQuery</title> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ var arrNames = ['Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby']; $.each(arrNames, function(i, val) { setTimeout(function() { $('#divDisp').fadeOut("slow", function() { $(this).text(val).fadeIn("slow"); }); },i * 3000); }); }); </script> </head> <body> <div id="divDisp" style="background-color:#00ff00;"></div> </body> </html>
Jquery Animate from DataBase
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Loop through an array using jQuery</title> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ var arrNames = ['Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby','Tom', 'Jane', 'Harry', 'Rick', 'Moby']; $.each(arrNames, function(i, val) { setTimeout(function() { $('#divDisp').animate({width:'0px'}, function() { $(this).text(val).animate({width:'350px'}); }); },i * 3000); }); }); </script> </head> <body> <div id="divDisp" style="background-color:#00ff00;"></div> </body> </html>
Tuesday, December 11, 2012
Display Inline Block
<html> <head> <style type="text/css"> .toolbar ul { display:block; width: 600px; padding: 0; } .toolbar ul li { display: inline-block; list-style-type: none; vertical-align: middle; border: solid 3px gray; margin: 2px; } </style> </head> <body> <div class="toolbar"> <ul> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> </ul> </div> </body> </html>
Display Table Property two
<html> <head> <style type="text/css"> .toolbar ul { display:table-row; } .toolbar ul li { display: table-cell; height: 100px; list-style-type: none; vertical-align: middle; border: solid 5px gray; } </style> </head> <body> <div class="toolbar"> <ul> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> </ul><ul> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> <li><a href="#">first item<br /> <img src='http://www.cfht.hawaii.edu/en/news/ngcfhtannounce/Banner_image2.jpg' width='100px' alt='' /><br /> first item</a></li> </ul> </div> </body> </html>
Display Table Property
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> .toolbar ul { display:table-row; } .toolbar ul li { display: table-cell; height: 100px; list-style-type: none; margin: 10px; vertical-align: middle; } .toolbar ul li a { display:table-cell; vertical-align: middle; height:100px; border: solid 1px black; } .toolbar ul li.button a { height:50px; border: solid 1px black; } </style> </head> <body> <div class="toolbar"> <ul> <li><a href="#">first item<br /> first item<br /> first item</a></li> <li><a href="#">second item</a></li> <li><a href="#">last item</a></li> <li class="button"><a href="#">button<br /> button</a></li> </ul> </div> </body> </html>
Monday, December 10, 2012
Jquery For Each Set Time Out and Ajax Tabes
<script type="text/javascript"> $(document).ready(function () { $("#TabbedPanels1").tabs(); $.ajax({ type: "POST", url: "Default.aspx/lawersDetailsList", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { var arrayList = data.d; $.each(arrayList, function (i, val) { setTimeout(function () { $('#slide-1').fadeOut("slow", function () { $(this).html("<h1>" + val.memberName + "</h1>" + "<p>" + val.offAddress + "</p>" + "<a href='LawyerProfile.aspx?id=" + val.memID + "'><img src='MemPhoto/" + val.imageID + "' /></a><br />").fadeIn("slow"); }); }, i * 5000); }); } }); var arrayCount = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; $.each(arrayCount, function (j, values) { setTimeout(function () { $.ajax({ type: "POST", url: "Default.aspx/memberProfilesList", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { var arrayList = data.d; $("#membersProfile").fadeOut("slow"); $('#membersProfile').html(""); $.each(arrayList, function (i, val) { $('#membersProfile').append("<a href='LawyerProfile.aspx?id=" + val.memID + "'><img src='MemPhoto/" + val.imageID + "' width='50px' /></a>"); }); $("#membersProfile").fadeIn("10000"); } }); }, j * 30000); }); $('#TabbedPanels1').bind('tabsselect', function (event, ui) { var callMethod; var tabSelected = "#TabbedPanels1" + ui.index + "Selected"; if ($(tabSelected).text() == "") { switch (ui.index) { case 1: callMethod = "Default.aspx/NewsUpdatesCollections"; break; case 2: callMethod = "Default.aspx/DesignatedSeniorsList"; break; case 3: callMethod = "Default.aspx/MostViewedprofilesList"; break; case 4: callMethod = "Default.aspx/LastViewedprofilesList"; break; case 5: callMethod = "Default.aspx/RecentlyUpdatedMembersList"; break; } $.ajax({ type: "POST", url: callMethod, data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", async: true, success: function (data) { alert(data.d); switch (ui.index) { case 1: alert(data.d); break; case 2, 3, 4, 5: alert(data.d); break; } } }); } }); }); </script>
Subscribe to:
Posts (Atom)