Tag | Javascript Posts

This is like a very common issue, specially for those who are working on public site which is live and they have to release the builds every week or month and if the new build contain JS files then your change will not reflect on the client browser until someone there presses ctrl + F5. So, after googling this issue. I came to know it is possible to prevent the browser from accessing the cache copy by writing the script tag as below 1: <script type="text/javascript" src="../Includes/main.js?ra... ...
“Web 2.0” is a buzzword used all over the place these days. So what does it mean? Web 2.0 actually means a lot of different things and it means different things to different people. This is the first of a multi-part series attempting to define Web 2.0. Follow my blog at http://www.drivingsales.com... for future posts. Part 1 - “We're Talking Back” One definition of Web 2.0 is the ability for everyday people to change the Internet. A few years ago the Internet was mostly created by businesses ...
I was generating some JavaScript in the server code and found that bool.ToString() doesn't create string that JavaScript expects as boolean- .Net uses first letter as capital True/False. Then I found in my own class, that I've wrote helper function a long time ago: public static string JSToString(bool bValue) { return bValue.ToString().ToLower(); } ...
In the post below I am going to run down a short-list of some of the less-popular performance tips and the reasoning behind them. There are loads of blog postings and articles on asp.net performance enhancements, and I urge you to check those out as well. Onto the good stuff... Session.ReadWrite versus Session.ReadOnly It goes without saying that using the Session object will incur some performance overhead so if possible it should be turned off in the web.config. That said, If you’re using the Session ...
IIS Custom HTTP Error Messages Error code Error message 400 Cannot resolve the request. 401.1 Unauthorized: Access is denied due to invalid credentials. 401.2 Unauthorized: Access is denied due to server configuration favoring an alternate authentication method. 401.3 Unauthorized: Access is denied due to an ACL set on the requested resource. 401.4 Unauthorized: Authorization failed by a filter installed on the Web server. 401.5 Unauthorized: Authorization failed by an ISAPI/CGI application. 401.7 ...
<update> Be sure to check out the new video blog post based on this entry. It may be easier to follow and has a couple of upgrades from this post: Creating a SharePoint List Parent/Child Relationship – VIDEO REMIX </update> <update 12-16-2010> I FINALLY got around to blogging how to do this in SP 2010, you can find that blog here: Creating A SharePoint Parent/Child List Relationship– SharePoint 2010 Edition </update 12-16-2010> First Things First Okay, first off, my development ...
Eventually, I will be creating my own content.  For now, I'm satisfied to simply regurgitate other people's points of view.  :)

Infoworld Article: The 7 deadly sins of IT management

How many of these sins are you guilty of?  I think this applies to IT Professionals, not just managers...  The thing is, those who don't manage should know better...  ;)
Download the design template here. In my role, I am lucky enough to get to design lots of very cool software to solve (sometimes difficult) business problems. Many times, these applications involve design solutions that leverage SharePoint technologies. In this series, I will be discussing some of the design patterns and documentation patterns that I have encountered in my applications. Disclaimer: this documentation is given as-is, so please use it and modify it as needed to meet your needs. This ...
Please note, I've moved this post and cleaned it up a bit...you can find it at the following URL:

http://geekswithblogs.net/SanjayU/archive/2009/04/15/another-abstract-factory-amp-strategy-pattern-explanation.aspx

Cheers!
I was writing an app in which i needed to store a dictionary.. I thought to post the code..: public void StoreDictionary(Dictionary&... files) { FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(fs, files); fs.Close(); } public Dictionary<string, FileInfo> RetrieveDictionary() { FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); BinaryFormatter bf = new BinaryFormatter(); ...
Today I was working on a WebForm that includes a GridView which presents text boxes for various columns. I put these in the ItemTemplate so all of the rows could be edited at any time. The next requirement was to update certain read only columns (e.g. Total Amount) based on the changes of the others. Originally, I had the entire GridView in an UpdatePanel, but that quickly proved to be a problem for two reasons. First, the updates were fairly slow. Second, the active control would lose focus after ...
Good news ... On Monday December 8th, 2008 Microsoft announced Public beta of BizTalk Server 2009 (https://connect.microsoft.... What’s new in BizTalk Server 2009? Ø Simplify Interoperability ü Support for .NET Framework 3.5 SP1 and Visual Studio 2008 SP1 - take advantages of the latest developer tools. ü Support for Windows Server 2008 and SQL Server 2008 – full support of Hyper-V, and increased performance and scale. Ø Extend To The Edge ü EDI - enhanced out of the ...
I flattened my home PC this weekend and started to get "only part of a Readprocessmemory or Writeprocessmemory request was completed" error message when I tried to read any discs with my LG Dvd drive. Since the solution seemed rather obscure to me I figured I better post the answer that I found for the next time this happens to me. Go into your device manager->IDE ATA/ATAPI controllers. Right click on secondary and choose properties. Go to the advanced settings tab and choose PIO only for "transfer ...
A big Thank you to Lee Brandt for organizing a great event in good ole Kansas City. There was a great turn out for the event and the event was very well organized. I reluctantly took on presenting jQuery for the Day of Dot Net event, but I am glad I let Lee talk me into it. It feels great to be presenting. (If you can get passed the fear of public speaking.) For those of you who attended my jQuery presentation, Thank you to you as well. I hope it was enlightening and if you’re not using a javascript ...
In this issue: Pete Brown, Tim Greenfield, Boyan Nikolov, Jesse Liberty, Mike Ormond, David Justice, Tim Heuer, Chris Szurgot, Matthias Shapiro, Budi Kurniawan, Mike Snow, Martin Grayson, and Azret Botash Busy folks... I've still got a backlog and I was only slow a couple days :) From SilverlightCream.com: Pie Chart Styling in the Silverlight Toolkit - Cross-Slice Gradients Pete Brown gives us the benefit of his excursions in the chart control plus his conversation with team members, and he ends ...
In this issue: Alex Golesh, Bart Czernicki, Matthias Shapiro(3), Michael WOlf, Swiss MSDN Team Blog, Michael S. Scherotter, Jesse Liberty, Chris Carper, Bill Reiss, Jonathan van de Veen, and Jobi. Shoutout: Adam Kinney reports that Project Rosetta turns into a MIX09 workshop From SilverlightCream.com: Silverlight Tip: How to Inject and Execute JavaScript Function(s) on-the-fly from Silverlight Alex Golesh has a post up on injecting JavaScript Functions from Silverlight. He has a nice text-entry front ...
December user group meeting we combined the Roanoke Valley .NET User Group and Roanoke VAlley SharePoint User Group into one meeting. Kudos to Kevin Israel for addressing an audeince that is: 50% SharePoint Admins that do not know .NET 50% .NET Develoeprs that have never seen SharePoint He lived up to the promise of providing contnet for all. Quick overview of SharePoint OTB, SharePoint Object Model and SharePoint Services and then a demo in C#. Might have to do this again sometime before next December. ...
Here is a bit of JavaScript that can be used by a site visitor to email a page. Nothing fancy - just a plain ol' mailto command. 1: <script type="text/javascript"> 2: function mailThisPage() 3: { 4: var link = window.location; 5: var emailSubject = "Check this out: "+ document.title; 6: var emailAddress=prompt("Please enter the recipients email address",""); 7: window.location = "mailto:"+emailAddress+"?Su... 8: } 9: </script> Technorati Tags: javascript ...
Oh the adventures of JavaScript and ASP.NET. Can you turn on validators [RequiredFieldValidators or otherwise] from JavaScript. Yes, and actually it is easier than I thought. ValidtorEnable(ControlId,Tr... Ex: //You could easily make this prettier by not hardcoding the ClientID here ValidatorEnable(document.ge... true); Keep in mind, you need to pass the object not the clientID of the object. Source: http://msdn.microsoft.com/e... ...
Hi!, As all of you (I hope) I want to have something similar to Intellisense everywhere. So also I want it in JavaScript and particularly in jQuery. Yeah, yeah, I know, that we have Script# and even M$ uses it, but I want pure JS and pure jQuery. I become very as jQuery team brought us Visual Studio Documentation for jQuery. It is on their site in download section. Works very nice and start its help as soon as you start typing, $ goes first then identifier in brackets and after $("sth"). there is ...
How to Customize theme code for MYTHEME theme. It is only necessary if you want to create another one like MYTHEME theme. Here are the instructions of creating Custom Theme with MYTHEME standard. How to: Customize Themes You can add new themes or customize existing ones for application to Web sites in Microsoft Windows SharePoint Services 3.0. This programming task shows how to customize an existing theme. To create and customize from an existing theme Copy one of the theme folders in Local_Drive:\Program ...
Here are the slides from the presentation I gave to the UK BizTalk User group (now the UK SOA/BPM group). I gave two sessions – firstly an overview of the work we had done at my current employer and then running through some code, configuration and live demos. The download location might change if I find a more suitable home. The initial project was part of the Integration story in rolling out a global instance of SAP. The first interfaces we put live were those between the UK Warehouse Management ...
Hi!, In first post I wrote, that I'll write posts from beggining, so that newbies could start writing MVC apps as my new posts would be coming. But I change my mind :D. We'll start from knowledge that is here. MVC pattern and ASP.NET MVC approach is something that you have to know, but you don't have to read other tutorials on asp.net/mvc, because we'll egzamine them in different way - understanding it from the total basics - looking at the MVC source code. So watch that video and next post I'll ...
Selecting Items in a list using DIVs instead of Radio Buttons Problem: Radio buttons cannot be styled using CSS. Another problem is that they simply f*** up your design if used incorrectly. They are also not very useful if you would like a user to be able to click on a large item in order to select it. Solution: A solution to this problem would be to allow the user to click on whole DIVs in order to select an item. This is done using some javascript, CSS and a hidden textbox. This is how it's done ...
In my previous post, I discussed how return statement is executed in try-finally clause. So in following program: string str = "original string"; try { return str; } finally { str = "changed in finally"; } the original value will be returned instead of the value changed in finally block. Would this feature be useful anywhere? Well, I can’t find anything in C#, but I can think up an example in javascript. First, let’s have a look of following javascrip code: function createDiv() { var div = document.createElement("div"); ...
I recently had a request from a client for an application that could be distributed and run from a USB memory stick. I wrote it in .NET of course, but some of the target machines don’t have the .NET framework installed (it’s getting more common, but it’s not ubiquitous yet). This wouldn’t have been a problem if we were installing the application because the installer would have taken care of that for me, but because it was designed to run from the USB memory stick I needed to write a bootstrap that ...
During the development I faced this problem, but because I have no time to spend to see how to accomplish this, I met for simplicity in my web.config file a key with the right link. But now I have some time to revise the code and adjusted it. The situation is the following: on one server the application is configured to use the following URL in IIS http://localhost/DOD.Defaul... on another server : http://www.dod.com/Informat... Now how to accomplish this without using a ...
i love stack overflow. it's like experts exchange, only it works. i have posted several questions (see here) and got answers on almost all happy happy joy joy. answering questions gains you reputation. more reputation means more functions, like up or downvoting. elegant. go try it with a question. -edoode ...
If you haven't seen Google analytics before, you ought to know this: it rocks. You'll get great reports on everything from geographic location to browser to flash version (Why no Silverlight version, eh Google?) See example awesomeness here: Obviously I've only recently set this up. However, since it is up and running and working great, I figured I'd show you how to get yours up and running as well. Firstly, sign up for Google Analytics. Then afterwards, Google will provide a script to monitor the ...
Well after agreeing to take over managing my local user group I've managed to have 2 meetings in the past couple of months and interest seems to be building back up. On Wednesday it was my turn to present on some of the new T-SQL features found in SQL Server 2008. It felt good to be up front and presenting again as it has been a while for me. I was a bit rushed for time since I was the second of two presenters but that was fine with me. I simply cut out some demos. I know I made some mental notes ...
So people are always asking me how do I get Silverlight to work in SharePoint? Then Paul Galvin and some other people told me why not post the steps. So here is what you want to do: Get Visual Studio 2008 and download SP1 from http://www.microsoft.com/do... The installer may stick at one part and may take an hour or two, so make sure you leave tons of time to spare. Get the Microsoft Silverlight Tools for Visual Studio ...
In AJAX based applications its common that user might end up breaking your AJAX calls by clicking on numerous places in very short interval of time. Let us assume there is a page where there are several of hyperlinks which make WebService calls and do some stuffs on callback. If user clicks on five hyperlinks being impatient or may be just for fun, there will be five different WebService calls made. All of those calls had the same parameters or UI state while they were invoked. But on completion ...
Ok I had to do it. This is a lot of fun and can be used to pass some time. Check out ElfYourself.com, and Elf Yourself :) Send your own ElfYourself eCards ...
Being a user group leader (Bartlesville .NET User Group) I get a lot of messages for recruiters looking for jobs. Given the current market situation I like to pass these on. This one looks pretty interesting. If you are interested give Darbi a call and let him know I sent you: Know anyone (maybe you) who might be interested in the following position? It is located in Oklahoma City, Oklahoma. It is a direct hire position with a great company. If you are interested or know someone who is, send me a ...
It is official. I have registered for CodeMash '09. I have been told that this is the single-most important conference to go to. Many people have told me this. I have also been told that all the cool kids will be there. In fact, almost everyone I know in the community is planning to go...I HAVE to see what all the hype is about. The neat thing about this conference is how focused it is on being unfocused. There are a ton of languages and platforms being talked about... lots of hands-on labs... Open ...
Just got back from TechEd EMEA Barcelona, had a great week as MCT proctor in the Hands-on-Labs area for the SOA/BMP track, Ask-the-Expert on Biztalk and supported at the Ramp-up booth. Fun stuff to do. Most exciting part of this trip was my participation in the Speaker Idol contest. Speaker Idol is a contest for aspiring TechEd Speakers, a live competition on presentation skills between fellow European community geeks. We all did a 5 minute presentation at the community area for a panel of judges ...
If C# 3.0 was all about Language Integrated Query (LINQ), then C# 4.0 is all about dynamic programming. What exactly does that mean? It means that C# 4.0 brings some of flexibility and declarative style of programming to C#. But what does that really mean? To sum it up in one keyword: dynamic. C# 4.0 is adding a new dynamic keyword which is used as a data type in much the same way the var keyword is used. Why is this important? The biggest reason is that it allows a C# program to use dynamic dispatch ...
Today for the first time in my entire life I will enter the state of North Carolina. I will be speaking at Raleigh Code Camp about Cheap and Easy Wildcard Search in MOSS (1 of the many talks) using the Query Object Model. I created the user control demo, but I decided to do the webpart demo with STSDev on the fly. I might shove a bit in about what you need to check in STSDev to make sure the webpart is working properly and deploy a webpart properly for those people trying to get started in SharePoint ...
Introduction This part in the series will focus on the SelectionController. Here is where most of the work is done. We've already covered the view interface, IRowSelectionView. Now we will see how the controller interacts with the view. Recap: Custom GridView Guidelines - Preface Custom GridView Guidelines - Part 1 - Preparing the Canvas Custom GridView Guidelines - Part 2 - Selection Interface Capturing Shift and Ctrl Key Status We want to emulate multi-selection as in Windows Explorer. The Shift ...
I just read the MSDN article on the Visual Round Trip Analyzer. This tool is awesome for finding bottlenecks in your web applications. It also allows you to see where your expensive download points are. With this tool I discovered that if I put a parameter after my large javascripts, such as JQuery, I can set the content expiration in the headers for 1 year. Then any time I need to change the javascript file (also works with images, css, etc...) the browser will then treat the file as new and redownload ...
Script Manager Object allows developers to add AJAX Capabilities to ASP.NET page, this object contains end request event in the client side, this event fired when the AJAX request completed. AJAX request may complete successfully, with errors or timeout. End Request event have args object, the args object can be used to examine the request completion. The args object contains the following members: args._errorHandled - Boolean property indicates whether you handled the error or not. args._response ...
Check these really good articles by James Tsai. Understand SharePoint Permissions - Part 1. SPBasePermissions in Hex, Decimal and Binary - The Basics Understand SharePoint Permissions - Part 2. Check SharePoint user/group permissions with Permissions web service and JavaScript Thanks Suranja for sending me these links ...
Here's a simple way to avoid postbacks in your site, still be SEO friendly and degrade gracefully to JavaScript free browsers (and handle middle clicks and copy&paste) in ASP.NET MVC using jQuery. First, we'll create an alternate MasterPage called No.master with no content, only one ContentPlaceHolder: <asp:ContentPlaceHolder ID="MainContent" runat="server" /> Now, we're able to tell via HTTP Headers if a Request is an Ajax Request, so we'll write a new method in our Controller Base class ...
After using Silverlight for a couple months, here is my wish list: 1. SQL Reporting Services viewer in Silverlight. 2. Ability to print from Silverlight. (See #1) 3. 3rd party components that have default styles and/or designers that make it easier to work with the components. Right now you have to figure it all out in xaml... Matt Watson Automotive Software ...
Just an update on our experiences with Silverlight... We have been using Silverlight since SL2 Beta 2 came out and so far it has been great to work with. We have noticed a lot of weird quirky things with Visual Studio, Blend, exception handling, and all sorts of things. But all in all it has been great to work with and our new Silverlight based software is pretty wicked. We look forward to what Silverlight 3 will look like after they have worked out all the kinks. Right now we are paying the price ...
I've created the MyTableClass CSS class(stored in .CSS file) and specified it to a HTML table. .MyTableClass { font-size: 8pt; } However the size of font inside the table was bigger than I specified. Thanks to VS 2008 CSS properties pane - Applied Rules section I was able to find that the rule was overridden by TD element style TD { font-size: 12px; } It was not hard to create hack to override global TD. .MyTableClass TD { font-size: 8pt; } I feel that having global element rule is not a good idea. ...
I recently wrote an internal memo identifying accessibility problems with Telerik RadWindows for the website I'm currently working on. I post the items here hoping that they might be useful for some of you out there. Some of this is specific to our environment (IE6) and design standards but may be helpful for you too. Some apply to other modal window implementations as well. 1. Modal windows complicate the page. One of the primary axioms of designing for accessibility is simplification. I also experienced ...
In this issue: Rich Griffin, Nikolay Raychev, David Anson, Manish Dalal, and Terence Tsang. I apologize for not posting this on Monday, but Scott Barnes is asking for everyone's assistance on a poll: Calling all Silverlight/WPF Developers & Designers. Then today Tim Heuer posted this: Hey Startups – get some BizSpark ... wow... if you're a startup, check that out! From SilverlightCream.com: Silverlight themes 101 - Resource Dictionary Visual Studio Item Template Rich Griffin posted an item template ...
I am sure most of developers would love to get free softwares from Micrsoft.But professionals generally get softwares from their companies .Even Then,If u r a college student,OR u r a professor/teacher or u r below 26,This offer is for u . Microsoft is giving out free softwares to all above people which include Visual Studio 2008 pro,Wiindows server standard, Expression studio2 ,XNA etc. The softwares are available under the banner of dreamspark. For more info visit : http://www.dreamspark.com It ...
I thought I would share the sessions at the PDC I really enjoyed and would recommend for viewing for those that didn't attend. And you know who you are. :) And those who did attend but didn't get to watch these. I'm sure there are more that were great, but these are the ones that stuck out to me. Deep Dive: Dynamic Languages in Microsoft .NET Jim Hugunin gives a great session on Dynamic Languages. This was the best talk I went to the entire PDC so I'm listing it first, but you should watch The Future ...