Monday, June 27, 2011
#
I have moved myself to a new website . Going forward I will be posting there. So please change your bookmarks.
http://thanigai.net
This is going to be my technical blog . cheers :)
Friday, December 04, 2009
#
Today we had a little situation where to get the selected text of Dropdown in Jquery. As far as I know we can get only the value as given below
This gives the selected value. I did a little google and found a helpful text in discussion forums . The answer will be simple.
$("#somedrop option:selected").text()
|
Please let me know if you have some other ways also.
Thanks,
Thani
Monday, November 16, 2009
#
All these days I was trying out with ADO.Net Dataservices in my local Visual Studio 2008 express which used to run in the Cassini WebServer which comes along with that. I was having some problem with the port as the number is dynamic.So I decided myself to upload the same in IIS and did so. When tried running the app pointing to the DataService file "Data.svc" I got a boom error saying the MIME type was not registered. I was going through IIS trying to find a possible solutions .I tried adding the Extension in the IIS manually. But I could not find the handlers for that. Then I did a little bing and found some solution. We need to register the WCF module with IIS otherwise we wont be getting those MIME types. The commands are as follows.

This command used to be "ServiceModel.exe –I" in previous versions and now it changed to "ServiceModel1Reg.exe -i". After this you will get the installations done as below.

That's it .We can see the MIME types up in the IIS as below.

I referred the following link
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/f447c6df-6402-4a13-875c-925445fd7be8/
Thanks,
Thani
Sunday, November 08, 2009
#
Hi All,
The most awaited RIA services is live. You can check the below blog post. http://blogs.msdn.com/brada/default.aspx
Thanks, Thani
Monday, November 02, 2009
#
I am currently studying some of the listed articles which may be of useful for you guys
Hope they will be of great use.
Thanks,
Thanigainathan.S
Friday, October 30, 2009
#
Today I was trying to call ASP.Net web service from JQuery. I thought it was easy first. But when tried implementing them I felt the difficulty. I don't had this problem while calling Ajax enabled WCF service from JQuery. Hence I did a small Bing and found out some useful tips to share. I referred links below.
The above links are very helpful. In addition to that you may need the following prerequisites.
- Visual Studio 2008
- Jquery 1.3.2
- Jquery-1.3.2-vsdoc.js
I will list the steps I have followed. Create a New ASP.net application and name as you want. In my case I named it AjaxDemo.
Once the project is created you can copy the Jquery 1.3.2 and Jquery-1.3.2-vsdoc file into the project folder. Add a new WebService named WebService1.asmx.
Now import two namespaces for enabling the WebService to be accessed from JavaScript.
using System.Web.Script.Serialization;
using System.Web.Script.Services;
The class Webservice1 has to be marked as ScriptService .This is very important.
[System.Web.Script.Services.ScriptService]
public
class
WebService1 : System.Web.Services.WebService
{
Next the method needs to be marked as WebMethod as usual and ScriptMethod for enabling client access.
[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public
string
HelloWorld()
{
Since I am using the JSON as the data type I am marking the Response format as JSON. The data that has to be sent from server has to be serialized as JSON. I have give a sample below.
JavaScriptSerializer
js = new
JavaScriptSerializer();// Use this when formatting the data as JSON
return
js.Serialize("Hello World");
That's all needed on server side. Next we will look at JQUERY client invokation.
<html
xmlns="http://www.w3.org/1999/xhtml"
>
<head>
<title></title>
<script
src="jquery-1.3.2.js"
type="text/javascript"></script>
<script
language="javascript"
type="text/javascript">
$.ajax({ type: "GET",
contenttype: "application/json; charset=utf-8",
data: "{null}",
url: "WebService1.asmx/HelloWorld",
dataTyp:"json",
success: function(res) {
$("#Text1").val(res.text);
},
error: function(err) {
alert(err);
}
});
</script>
</head>
<body>
<form
id="myForm">
<input
id="Text1"
type="text"
/>
</form>
</body>
</html>
As you can see from above $.ajax is used to call the WebService. The data send should be as "{null}". This is very important otherwise it wont work.
Here I have assigned the result to only a text box. The same scenario can be applied for complex situations. I will discuss about the complex things later.
Thanks.
Wednesday, October 28, 2009
#
Visual Studio 2010 Beta 2 is released. I tried searching for the ISo copy and could not find one. Finally they released the ISO copy also.
http://msdn.microsoft.com/hi-in/vstudio/dd582936(en-us).aspx
There under the downloads section you can find the ISO link of rthe Ulitmate,Premium and professional edition.
Thanks,
Thani
Friday, October 23, 2009
#
I should definetely share this link by Scott Gu on the updates of VS10. There are some series of 10 posts in them. Please read them .
http://weblogs.asp.net/scottgu/archive/2009/08/25/vs-2010-and-net-4-series.aspx
Hi All,
I got a chance to read the Blog from Scott Gu
Very nice post explaining the new intellisense features available in VS 2010. I am sure MS would have done a good R&D in this field and came up with the solution. The intellisense members are now searched based on
1. Events,Methods and Properties listing all of them .We don had this feature previously.
2.Keyword searching .For example typing Mouse will list all the events and methods related to that.
3.Type searching . When we type the name like Hash the all the types are listed filetring the events and other unwanted things.
4. Pascal Intellisense. Typing "LI" both are caps here. will list the ListItem and other related things here.
Please visit the link I have give below.
Thanks,
Thani
Thursday, October 22, 2009
#