2011
ASP.Net | Read Values from Javascript
Today I started checking out some videos about Windows CardSpace and ASP.Net for logging in and I saw how he used javascript to get client side input and use it in ASP.Net in the C# code.
First you need to create a HiddenField on your webForm and name it TokenField (any name would actually do)
<asp:HiddenField ID=”TokenField” runat=”server” />
To set the Hidden Field value in JavaScript use the following code: Continue reading »
2010
Div OnClick instead of a href | Quickie
Instead of using the “<a href=” tag to go to another page, you can use the “<div onclick=” to be transferred to another page. This is extremely useful if you have a lot of text and pictures that need to be clicked anywhere wanted. Next is the html code to achieve this:
<div id="div_id" onclick="window.location = 'Your reference here'> Your text here </div>
Hope this Quickie was of help
2010
Remove Special Characters (like !, %, &, #) from String | Javascript
No, this post is not about dieting or anything like that… but to remove Special Kharacters. To do this, I was going to use a for loop in javascript that checks each character and if it is not between ‘A’ and ‘Z’, the character will be removed. Until I found this code lying around on the net which makes removing special characters very simple…
2010
Response.End()
This is added after the text needed in the response stream is written using the Response.Write() so no other html or garbage is written in the response stream.
Without response.end() javascript will have the text and the remaining garbage.
[ex. 1] without response.end()
Response.Write(“err”);
…..
result =”err
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” ><head><link href=”../App_Themes/Default/Content.css” type=”text/css” rel=”stylesheet” /><link href=”../App_Themes/Default/Default.css” type=”text/css” rel=”stylesheet” /><link href=”../App_Themes/Default/EmailSender.css” type=”text/css” rel=”stylesheet” /><link href=”../App_Themes/Default/Header.css” type=”text/css” rel=”stylesheet” /><link href=”../App_Themes/Default/Header2.css” type=”text/css” rel=”stylesheet” /><link href=”../App_Themes/Default/Sidebar.css” type=”text/css” rel=”stylesheet” /><title> </title></head><body> <form name=”form1″ method=”post” action=”WebService.aspx” id=”form1″><div><input type=”hidden” name=”__VIEWSTATE” id=”__VIEWSTATE” value=”/wEPZwUPOGNjY2JiNjJiNWQ5MDI41In2qlnOWzD0wbpAPF80y1dPYTA=” /></div>
</form></body></html>” Continue reading »
2009
Return Array from Web Service using ScriptManager & Javascript
This is used to call the Web Service using ASP.Net and Script Manager. Must be inserted in .aspx page.
<asp:ScriptManager runat=”server” ID=”scriptManager”> <Services> <asp:ServiceReference path=”WebService/TestService.asmx” /> </Services> </asp:ScriptManager>This is the script to call the web service method and print the result on the form: Continue reading »
2009
Calling Web Service From Javascript
Hi my post explains how to call web service frm java script using AJAX.
If the web service class on the server includes a web method that does not return data, you can call the web service without having to handle a response. This is the simplest web method call that can be made from the client. For example, your application has the following web method:
What you missed
Check these Out!
Favourite Links
Tags
Archives
- May 2013 (1)
- January 2013 (2)
- December 2012 (5)
- November 2012 (4)
- October 2012 (3)
- September 2012 (1)
- August 2012 (4)
- July 2012 (2)
- June 2012 (1)
- May 2012 (10)
- February 2012 (6)
- December 2011 (2)
- October 2011 (3)
- September 2011 (1)
- April 2011 (6)
- March 2011 (14)
- February 2011 (9)
- January 2011 (10)
- December 2010 (6)
- November 2010 (10)
- October 2010 (6)
- September 2010 (10)
- August 2010 (4)
- June 2010 (10)
- May 2010 (2)
- April 2010 (1)
- March 2010 (1)
- July 2009 (1)
- June 2009 (1)
- April 2009 (4)
- March 2009 (1)
- February 2009 (5)
- January 2009 (10)
- December 2008 (8)
- November 2008 (4)
- September 2008 (6)
- August 2008 (11)
- June 2008 (2)
- May 2008 (3)
- March 2008 (1)
- February 2008 (1)
- November 2007 (1)
- September 2007 (2)
- July 2007 (2)
- June 2007 (1)
- May 2007 (2)
- February 2007 (3)
- January 2007 (4)
- November 2006 (1)
- October 2006 (1)
Categories
- Android (3)
- Apple (5)
- ASP.Net (37)
- Be Creative (1)
- Blackberry OS (1)
- CMS (5)
- Creative Computing (4)
- Crystal Reports (5)
- Day to Day (21)
- Deep Design Malta (8)
- Design and Development (22)
- Development Tools (15)
- Facebook (1)
- Games (3)
- Google Analytics (3)
- Google Gmail (1)
- Hotmail (1)
- Internet Explorer (7)
- iPhone/3G (19)
- iPod Touch (6)
- JavaScript (13)
- JQuery (2)
- Lumia (4)
- Microsoft (18)
- Microsoft SQL Server (21)
- Microsoft Visual Studio (27)
- MS Office (3)
- MVC (2)
- My Blog (3)
- NetBeans (1)
- Nokia (4)
- Off Topic (16)
- Online Services (3)
- Permissions (1)
- Phones and Tablets Platforms (7)
- Project NINE (11)
- PSP NGP (1)
- Quickie (9)
- SEO (7)
- Silverlight For WP7 (4)
- Sitefinity (1)
- Sony (1)
- Uncategorized (32)
- Utilities (57)
- VB .Net (1)
- Windows 7 (14)
- Windows 8 (3)
- Windows Live (3)
- Windows Mobile (5)
- Windows Phone 7 (18)
- Windows Phone 8 (1)
- Windows Vista (15)
- Wordpress (1)
- WP Apps (2)
- Yellow Pages (4)






