Wednesday, 9 October 2013

Enable disable asp.net textbox using  checkbox checked property in jQuery

$(document).ready(function () {
//On page load check either text box is enable or disable

    $('txtPedalPulseRight').prop("disabled", !$( 'chkPedalPulseRIghtNoScore').is(':checked'));
   
// Attach event on check box
    $('chkPedalPulseRIghtNoScore').change(function () {
        $('txtPedalPulseRight').prop("disabled", !$(this).is(':checked'));
    });

});

Wednesday, 2 October 2013

Find any content SQL Store Procedure And View



CREATE FUNCTION [dbo].[Search]
(
    @str VARCHAR(100)
)
RETURNS TABLE
RETURN
    SELECT
        DISTINCT    s.name AS SchemaName,
        o.name AS ObjectName,
        o.type_desc AS ObjectType
    FROM sys.objects o
    INNER JOIN syscomments c ON c.Id = o.object_id
    INNER JOIN sys.schemas s ON s.schema_id = o.schema_id
    WHERE
    is_ms_shipped = 0 AND c.text like '%' + @str + '%'