Search This Blog

Saturday, July 30, 2011

The operation has timed out.

This error come when we try to access a web service method and this method takes more than 2 minutes to response. Because IIS default timeout is 120 seconds.
To resolve this problem set the web service timeout at runtime
as below....

SheetCuttingWebService.Service objWeb;
objWeb = new UserInterfaceLayer.SheetCuttingWebService.Service();
objWeb.Timeout = 3600000(mili seconds);
dsPlate = objWeb.GetPlates(origin_id, specification, length, width, thickness, do_number, heat_no, plate_no, drawing_no, certificate_no, percentage_free, balance_wt, order_by_column, user_id, plate_id, reqLengthFrom, reqLengthTo, reqWidthFrom, reqWidthTo, IsDiscarded);

Monday, July 11, 2011

Javascript keyCode
























































































































































Key Pressed Javascript Key Code
backspace 8
tab 9
enter 13
shift 16
ctrl 17
alt 18
pause/break 19
caps lock 20
escape 27
page up 33
page down 34
end 35
home 36
left arrow 37
up arrow 38
right arrow 39
down arrow 40
insert 45
delete 46
0 48
1 49
2 50
3 51
4 52
5 53
6 54
7 55
8 56
9 57






























































































































Key Pressed Javascript Key Code
a 65
b 66
c 67
d 68
e 69
f 70
g 71
h 72
i 73
j 74
k 75
l 76
m 77
n 78
o 79
p 80
q 81
r 82
s 83
t 84
u 85
v 86
w 87
x 88
y 89
z 90
















































































































































Key Pressed Javascript Key Code
left window key 91
right window key 92
select key 93
numpad 0 96
numpad 1 97
numpad 2 98
numpad 3 99
numpad 4 100
numpad 5 101
numpad 6 102
numpad 7 103
numpad 8 104
numpad 9 105
multiply 106
add 107
subtract 109
decimal point 110
divide 111
f1 112
f2 113
f3 114
f4 115
f5 116
f6 117
f7 118
f8 119
f9 120
f10 121
f11 122
f12 123






































































Key Pressed Javascript Key Code
num lock 144
scroll lock 145
semi-colon 186
equal sign 187
comma 188
dash 189
period 190
forward slash 191
grave accent 192
open bracket 219
back slash 220
close braket 221
single quote 222

w3schools

http://wwwhttp://www.blogger.com/img/blank.gif.w3schools.com/default.asp

Wednesday, July 6, 2011

Sys.InvalidOperationException: Handler must be a function.

This exception comes when you give java script function name with parenthesis to an ajax control. e.g <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
...
....
<form id="form1" runat="server">
   
<asp:ScriptManager ID="sm1" runat="server"></asp:ScriptManager>
   
<cc1:TabContainer runat="server" ID="tbcTabContainer" OnClientActiveTabChanged="ChangeTab()"></cc1:TabContainer>
</form> Above OnClientActiveTabChanged="ChangeTab()" is not valid. Solution: Change OnClientActiveTabChanged="ChangeTab()" to OnClientActiveTabChanged="ChangeTab"

AutoCompleteExtender with Animation


<ajaxToolkit:AutoCompleteExtender runat="server" BehaviorID="AutoCompleteEx"
ID="autoComplete1" TargetControlID="txtPayorName" ServicePath="~/Public/AutoCompleteService.asmx"
MinimumPrefixLength="1" CompletionInterval="1000" EnableCaching="true" CompletionSetCount="20"
ServiceMethod="GetPayorsList" CompletionListCssClass="autocompleteCompletionListElement"
CompletionListItemCssClass="autocompleteListItem" CompletionListHighlightedItemCssClass="autocompleteHighlightedListItem"
DelimiterCharacters="">

    <Animations>

        <OnShow>
              <Sequence>  
                     <OpacityAction Opacity='0' />
                       <HideAction Visible='true'/>                                              
                        <Parallel Duration='.1'>
                                <FadeIn />
                                 <Length PropertyKey='height' StartValue='0' EndValueScript='225' />
                       </Parallel>
               </Sequence>
             </OnShow>
             <OnHide>
                    <Parallel Duration='.1'>
                           <FadeOut/>
                            <Length PropertyKey='height' StartValueScript='225' EndValue='0'/>
                     </Parallel>
               </OnHide>
    </Animations>
</ajaxToolkit:AutoCompleteExtender>

Tuesday, July 5, 2011

Excel System.Data.OleDb.OleDbException: No value given for one or more required parameter

This Error comes when Excel connection string "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1" " contains 'HDR=Yes' and you are using F1,F2, F3, etc in your select statement.

Solution:
if your Excel connection string contains 'HDR=Yes' then valid columns would be in the first row of the specified Worksheet (or Range). Otherwise, (HDR=No) the column names default to F1, F2, F3, etc.