Thursday, 28 March 2013

How put multiple Parameter using Variable in IN Clause in Sql Server

declare @val varchar(20)
declare @sql nvarchar(200)
set @val = '''A'',''B'',''C''' --Your Prameter of Program

print @val

Set @sql='select * from SomeTable where name in ('+@val+')'
--Print @sql
exec sp_executesql @Sql -- Is used to Execute Sql query

Wednesday, 13 March 2013

How to Enable Disable control using JQuery

$('#<%=DdlLocation.ClientID%>').attr('disabled', 'disabled');

How to set Selected Value of Drop Down List in Using JQuery

1. )



$("#<%=DdlLocation.ClientID%> option[value='1' ] ").attr("selected","selected");


$("#<%=DdlLocation.ClientID%> option[text='c' ] ").attr("selected","selected");