Thursday, April 12, 2012

Filing AZ Tax Online and Requesting for Extension

Filing AZ Tax Online and Requesting for Extension

Go to
https://www.aztaxes.gov/default.aspx
Click on Make Payment

Choose Payment Type as 204(This way you are Making Payment Rightaway however you will file your return within a period of 6 months nearly here we are requesting for an extension but not "extension of time to pay" so far i know w/o paying penalty extension of time to pay is not possible)

Choose Payment Method as "E-Check" if you choose Credit card you will have to pay ~ 14$ of fee.After above you should be good to paper file your AZ return with 6 months of extension.

Wednesday, March 7, 2012

Page.IsValid Property Returning False

If you have too many controls and validators(required field validator custom etc...) on your aspx page and you ever wondered which validator on your aspx page is causing Page.IsValid to return false or true This might come handy:) foreach (object o in Validators) { if (!((IValidator)o).IsValid) { Response.Write(((Control)o).ID + "
"); } }
Source:-http://forums.asp.net/t/1464738.aspx/1

Thursday, February 9, 2012

Enabling Disabling an Asp Label(which works in Chrome/firefox/IE) Without Using .disabled in JavaScript

Enabling and Disabling a label(sounds crazy right because Label has no functionality but still you will see that requirement from Business quite often)

So here we Go:-

By now You would have noticed that if you use below the label shows as disabled in IE but not in chrome and Firefox:
document.getElementById(CityLabel).disabled = true;

I use a way which worked for me across all browsers( and since we are not causing a post back or something on Label click) so we can USE css here to do our Job

document.getElementById(CityLabel).style.color = "#666";

(above will show the label as Grey or disabled in all browsers and that is what I needed)

Friday, January 6, 2012

Using Jquery Ajax to Call a WebService

MatheMatics WebService Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;

namespace MatheMatics
{
///
/// Summary description for Sample
///

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
[System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService
{
[WebMethod()]
public string SquareOne(string x)
{
return (Convert.ToInt16(x) * Convert.ToInt16(x)).ToString();
}
}
}


Consumer of MatheMatics WebService
I have removed the greater than and less than sign from this .aspx page
@ Page Language="C#"
@ Import Namespace="System.Web.Services"

html
head id="Head1" runat="server"
title ASP.NET AJAX Web Services: Web Service Sample Page /title

script type="text/javascript" src="JS/jquery-1.7.1.min.js"


script type="text/javascript"
$(document).ready(function() {
jQuery.support.cors = true;
$("#sayHelloButton").click(function(event) {
$.ajax({
type: "POST",
url: "http://usphxawnr8a8tdc.aaaaa.edu:55637/Service1.asmx/SquareOne",
data: "{'x': '" + $('#Square').val() + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
crossDomain: true,
success: function(msg) {
AjaxSucceeded(msg);
},
error: AjaxFailed
});
});
});
function AjaxSucceeded(result) {
alert(result.d);
}
function AjaxFailed(result) {
alert(result.status + ' ' + result.statusText);
}

head
body
form id="form1" runat="server"
h1 ASP.NET AJAX Web Services with jQuery

Enter your Number:
input id="Square" runat="server"

input id="sayHelloButton" value="Square Is: "
type="button" runat="server"
form

body
html