Feed on
Posts
Comments

Mike Volodarsky (a program manager in the IIS team) wrote a great post about Breaking Changes for ASP.NET 2.0 applications running in Integrated mode on IIS 7.0

It is definitely worth reading it!

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

Lance Fisher has made an update to jQuery for Intellisense in Visual Studio 2008

Click here to read about it and download jQuery with the Intellisense updates.

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati
protected void Button1_Click(object sender, EventArgs e)
{
   Response.AddHeader("content-disposition", "attachment;filename=FileName.xls");
   Response.Charset = String.Empty;
   Response.ContentType = "application/vnd.xls";
   System.IO.StringWriter sw = new System.IO.StringWriter();
   System.Web.UI.HtmlTextWriter hw = new HtmlTextWriter(sw);
   GridView1.RenderControl(hw);
   Response.Write(sw.ToString());
   Response.End();
}
, ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati
  1. Top 10 custom JavaScript functions of all time
  2. Top 10 Web Developer Libraries
  3. Top 10 Ajax Applications
  4. Top 10 Ajax Tutorials for Beginners
  5. Top 10 Most Useful JavaScripts
  6. Top 10 JavaScript String Extensions
  7. Top 10 Debugging & testing Javascript
  8. Top 10 JavaScript Books
  9. Top 10 Javascript Tools Everyone Should Have
  10. Top 10 Tips To A Better Form

I found this list on this site

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

This is the list of my top 5:

Core JavaScript Reference
Gecko DOM Reference
AJAX:Getting Started
HTML4 Reference
CSS 2.1 Specification

, , , , ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

This is the list of mine top 10 JavaScript String.prototype extensions. If you want to you can post yours bellow.

This extension adds trim() function:

String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g,'’); }

//test trim
test = ‘ testing trim ‘;
document.write (’"’ + test.trim() + ‘"’);

This extension splits the string by given separator and returns an array with trimmed  items. It uses the trim() extension above:

String.prototype.splitrim = function(t){ return this.trim().split(new RegExp(’\\s*’+t+’\\s*’)) }

//test splitrim
test = ‘ testing   , splitrim ‘;
var arr = test.splitrim(’,');
document.write (’"’ + arr[0] + ‘"’);
document.write (’"’ + arr[1] + ‘"’);

This extension escapes HTML in the string:

String.prototype.escHtml = function(){ var i,e={’&’:'&amp;’,'<’:'&lt;’,'>’:'&gt;’,'"’:'&quot;’},t=this; for(i in e) t=t.replace(new RegExp(i,’g'),e[i]); return t }

//test escHtml
test = ‘testing <b>escHtml</b>’;
document.write (test.escHtml());

This extension unescapes HTML in the string:

String.prototype.unescHtml = function(){ var i,e={’&lt;’:'<’,'&gt;’:'>’,'&amp;’:'&’,'&quot;’:'"’},t=this; for(i in e) t=t.replace(new RegExp(i,’g'),e[i]); return t }

//test unescHtml
test = ‘testing &lt;b&gt;unescHtml&lt;/b&gt;’;
document.write (test.unescHtml());

This extension URL encodes the string:

String.prototype.urlEncode = function(){ return encodeURIComponent(this); }

//test urlEncode
test = ‘http://www.gmail.com’;
document.write (test.urlEncode());

This extension checks if the string is a valid email address:

String.prototype.isEmail = function () { var rx = new RegExp("\\w+([-+.\’]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); var matches = rx.exec(this); return (matches != null && this == matches[0]); }

//test isEmail
test = ‘test@gmail.com’;
document.write (test.isEmail());

This extension checks if the string is a valid URL address:

String.prototype.isURL = function () { var rx = new RegExp("http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w-\\+ ./?%:&=#\\[\\]]*)?"); var matches = rx.exec(this); return (matches != null && this == matches[0]); }

//test isURL
test = ‘http://www.gmail.com’;
document.write (test.isURL());

This extension checks if the string contains the passed as parameter value:

String.prototype.contains = function(t) { return this.indexOf(t) >= 0 ? true : false; }

//test contains
test = ‘Can you find me?’;
document.write (test.contains(’find me’));

This extension checks if the string begins with the passed as parameter value. The second parameter is for ignore case:

String.prototype.beginsWith = function(t, i) { if (i==false) { return (t == this.substring(0, t.length)); } else { return (t.toLowerCase() == this.substring(0, t.length).toLowerCase()); } }

//test beginsWith
test = ‘Can you find me?’;
document.write (test.beginsWith(’can you’, true));

This extension checks if the string ends with the passed as parameter value. The second parameter is for ignore case:

String.prototype.endsWith = function(t, i) { if (i==false) { return (t == this.substring(this.length - t.length)); } else { return (t.toLowerCase() == this.substring(this.length - t.length).toLowerCase()); } }

//test endsWith
test = ‘Can you find me?’;
document.write (test.endsWith(’Me?’, true));

, ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

This sample shows how to get the last day of the current week. It easily could be reconfigured to get any day of the week of any date.

DateTime dtWET = DateTime.Today;

//get the last day of the week. If you need another day change the 6 to a number between 0 and 6. Please note that depending on you regional settings the week 0 day could be Sunday or Monday.
dtWET = dtWET.AddDays((-(Convert.ToInt32(dtWET.DayOfWeek))) + 6);

dtWET = new DateTime(dtWET.Year, dtWET.Month, dtWET.Day, 22, 00, 0);

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

Continue Reading »

, ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

To open a page in new window with ASP.NET 2.0 button PostBackURL property you have to set the FROM’s target to "_blank".

Page.Form.Target = "_blank";

Or to use the following JavaScript code:

<script type="text/javascript">
    var sFormID = ‘<%=Page.Form.ClientID%>’;
    var oForm = document.getElementById(sFormID);
    oForm.target = ‘_blank’;
</script>

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

To redirect all HTTP requests to HTTPS with ISAPI Rewrite you can use the following rewriting rules in your httpd.ini file:

# redirect all http requests  to https
RewriteCond  %HTTPS (?!on).*
RewriteCond Host: (.*)
RewriteRule (.*) https\://$1$2 [I,RP]

,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

- Next »