Pesquisa

domingo, 26 de agosto de 2012

Foco após requisição Ajax

Para não perder o foco após uma requisição ajax do updatepanel é possível utilizar a função EndRequest.

var ID;

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

$("input.campo-texto1").live("focus", function () {
ID = $(this).attr('id');
});

function EndRequestHandler(sender, args) {
$('#' + ID).focus();
}



domingo, 8 de abril de 2012

ASP.NET AJAX v1.0 Sys is undefined error

“I have seen many blog entries and forum threads on this error however I was curious if anyone has any insight as to why this error seems to occur on Windows 2003 Server SP1 and not XP Pro SP2. I have not tested on Windows 2000 or 2003 without SP1.

When I deployed my application to the production server which is Windows Server 2003 SP1, I received this error after the ASP.NET AJAX 1.0 installation. Now I have never used a beta or RC release so this is the first time using ASP.NET AJAX in my application.

I turned to Google and I found the following:

if you are using Windows 2003 as web server then you'll face this "sys is undefined" error .to get rid of this weird problem follow the following steps:

  1. Open IIS and right click on your web site virtual directory and then click properties
  2. Then on virtual directory tab click on configuration button
  3. In mappings tab set the configuration like this.
    Executable: "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" - locate this dll file
    Extension: .axd
    Verbs: All Verbs
    Script Engine: checked
    Check that file exists: do not check this.
  4. Finally click OK.

The axd extension was in fact registered on the server but the Verbs was not set to allow all.”

Fonte: http://aspadvice.com/blogs/sswafford/archive/2007/01/25/ASP.NET-AJAX-v1.0-Sys-is-undefined-error.aspx

Navegar em todas as tabelas

SP que executa comandos SQL para cada uma das tabelas do banco de dados.
 
Acredite, pode ser útil.
 
http://weblogs.asp.net/nunogomes/archive/2008/08/19/sql-server-undocumented-stored-procedure-sp-msforeachtable.aspx

Exemplo:

exec sp_MSforeachtable @command1 = "select * from ?"

Multiupload de arquivo sem flash

Funciona no IE7 e 8 inclusive e vem com tutoriais para várias linguagens/frameworks.

http://blueimp.github.com/jQuery-File-Upload/