Asp.net modules
  • Home
  • c# Modules
  • Web Design
    • Html
    • Css
    • Java Script
  • Bootstrap
  • Sql
    • Queries
    • Stored Procedures
  • About Me
    • About Myself
    • My Projects
    • My Resume
  • Photo Gallery

Thursday, December 31, 2015

How to to toggle with js

 Unknown     9:47 PM     js     No comments   

Intoduction :-

Hii Friends...

Today I explain how to toggle a panel on click event with the help of Js. In Js there are many events like mouse-over,mouse-down,key press etc. So I explain this with the code.

Step : 1   The Code goes here :->

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#sheetal").click(function(){
        $("#panel").slideToggle("slow");
    });
});
</script>
<style>
#panel, #sheetal {
    padding: 5px;
    text-align: center;
    background-color: #249FA3;
    border: solid 1px #FFF;
}
#panel {
    padding: 50px;
    display: none;
}
</style>
</head>
<body>

<div id="sheetal">Click Here</div>
<div id="panel">Welcome On DotnetModules Blog</div>
</body>
</html>

  DEMO:- 

                               1) When On Click

                




 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Thursday, December 10, 2015

How to make rounded corners in Css

 Unknown     7:59 AM     css     No comments   

Introduction :-

Hii Friends...
Today I explain how to make rounded corners in css. We can make many types of corners with the help of css. Here i explain only rounded corners. we can make square , rounded , circle , rectangle etc. with the help of Css.

Step : 1   The Css goes here :->

<!DOCTYPE html>
<html>
<head>
<style> 
#rcorners1 {
    border-radius: 25px;
    background: #73AD21;
    padding: 20px; 
    width: 200px;
    height: 150px;    
}

#rcorners2 {
    border-radius: 25px;
    border: 2px solid #73AD21;
    padding: 20px; 
    width: 200px;
    height: 150px;    
}

#rcorners3 {
    border-radius: 25px;
    background: url(paper.gif);
    background-position: left top;
    background-repeat: repeat;
    padding: 20px; 
    width: 200px;
    height: 150px;    
}
</style>
</head>
<body>

<p>The border-radius property allows you to add rounded corners to elements.</p>
<p>Rounded corners for an element with a specified background color:</p>
<p id="rcorners1">Rounded corners!</p>
<p>Rounded corners for an element with a border:</p>
<p id="rcorners2">Rounded corners!</p>
<p>Rounded corners for an element with a background image:</p>
<p id="rcorners3">Rounded corners!</p>

</body>

</html>

DEMO:-


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Wednesday, December 2, 2015

Border style in css

 Unknown     3:39 AM     css     No comments   

Introduction :-

Hii Friends...
Today I explain how to make many types of borders in asp.net with the help of css. so now I explain this step by step.

There are many types of borders like :-


  1.  dotted - Defines a dotted border
  2.  dashed - Defines a dashed border
  3.  solid - Defines a solid border
  4.  double - Defines a double border
  5.  groove - Defines a 3D grooved border. The effect depends on the border-color value
  6.  ridge - Defines a 3D ridged border. The effect depends on the border-color value
  7.  inset - Defines a 3D inset border. The effect depends on the border-color value
  8.  outset - Defines a 3D outset border. The effect depends on the border-color value
  9.  none - Defines no border
  10.  hidden - Defines a hidden border

Step : 1   The Css goes here :->

<!DOCTYPE html>
<html>
<head>
<style>
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.none {border-style: none;}
p.hidden {border-style: hidden;}
p.mix {border-style: dotted dashed solid double;}
</style>
</head>
<body>

<h2>The border-style Property</h2>
<p>This property specifies what kind of border to display:</p>

<p class="dotted">A dotted border.</p>
<p class="dashed">A dashed border.</p>
<p class="solid">A solid border.</p>
<p class="double">A double border.</p>
<p class="groove">A groove border.</p>
<p class="ridge">A ridge border.</p>
<p class="inset">An inset border.</p>
<p class="outset">An outset border.</p>
<p class="none">No border.</p>
<p class="hidden">A hidden border.</p>
<p class="mix">A mixed border.</p>

</body>
</html>



DEMO:-  



                                                                                         
                                                                 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Thursday, November 26, 2015

stored procedure with case and actions

 Unknown     4:43 AM     sp     No comments   

Intoduction :-

Hii Friends...

Today I explain how to use case and action in stored procedure . 


CREATE Proc [dbo].[Proc_ManageRatingAndReview]--exec [Proc_ManageRatingAndReview] 'GetAllBySeller','','','101647'                
(                           
@Action nvarchar(50)='',                           
@ID int=0,       
@ProductID int=0,       
@SellerMsrNo int=0                          
)                           
as                           
begin                           
                            
if(@Action='Delete')                           
begin                           
delete tblRatingAndReview Where RatingAndReviewID = @ID                           
end                           
                            
                                 
if(@Action='IsActive')                           
begin                           
update tblRatingAndReview set IsActive=case when IsActive=0 then 1 else 0 end                            
where RatingAndReviewID=@ID                           
end                           
                            
                            
if(@Action='GetAll')                           
begin                           
Select * from tblRatingAndReview                            
where RatingAndReviewID= case when @ID=0 then RatingAndReviewID  else @ID  end  order by ProductID desc                           
end                         
                            
                         
if(@Action='Get')                           
begin                           
Select * from tblRatingAndReview                           
where RatingAndReviewID= case when @ID=0 then RatingAndReviewID else @ID  end and  IsActive='true'  order by ProductID desc                               
end      
     
if(@Action='GetAllBySeller')                           
begin                           
Select distinct IV.ProductName,RAR.*,MM.FirstName+' '+MM.LastName as SellerName from tblRatingAndReview as RAR    
inner join tblInvoiceDetail as IV on RAR.ProductID=IV.ProductID    
inner join tblMlm_memberMaster as MM on RAR.SellerMsrNo= MM.MsrNo                        
where RAR.SellerMsrNo= case when @SellerMsrNo=0 then RAR.SellerMsrNo  else @SellerMsrNo  end  order by RAR.ProductID desc                           
end    
                          
                       
                       
if(@Action='GetByProductID')                           
begin                           
Select RatingAndReviewID, ReviewTitle, YourReview, CONVERT(decimal(5,0),YourRating)as YourRating,IPAddress, ProductID, UserName, UserEmail, AddDate, LastUpdate, IsActive from tblRatingAndReview                           
where ProductID= case when @ProductID=0 then ProductID else @ProductID  end       
and SellerMsrNo= case when @SellerMsrNo=0 then SellerMsrNo else @SellerMsrNo  end       
and  IsActive='true' order by ProductID,AddDate desc                               
end                         
                   
                   
if(@Action='GetRating')                       
begin                       
                   
declare @Rating decimal(5,0)                   
select @Rating=ROUND(AVG(YourRating), 0) FROM tblRatingAndReview where ProductID=                   
 case when @ID=0 then ProductID                   
 else @ID                   
 end and  IsActive='true'                   
                   
if @Rating>0                   
begin                    
 select @Rating as Rating                   
end                   
else                   
begin                   
 select 4 as Rating                   
end                   
                   
                   
end                               
end
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Saturday, November 21, 2015

Some tricks for stored procedures

 Unknown     2:36 AM     sp     No comments   

Intoduction :-

Hii Friends...


Today I give some tricks that help in stored procedures when we are fixed. Like when we not found any stored procedure , or we alter any stored procedure then what we do.

 Trick 1 :-    when procedure not found then we write this query only . With the help of this query you can find any stored procedure that you want.


select * from sys.objects where name like '%yourSearchText'   


In this you only change the Stored procedure name that you want  and you find it.


Trick 2 :-    when procedure goes alter then recovery process is given blow .


SELECT deqs.last_execution_time AS [Time], dest.text AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC    



with the help of this query you can recover your sp.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Thursday, November 19, 2015

How to make ck editor in Asp.net

 Unknown     10:53 PM     Asp.net     No comments   

Intoduction :-

Hii Friends...


Today I explain how to make  Ck editor in asp.net. I think this will be interesting and time consuming for CMS type data entry where CKEditor is quite often used. As this process can be used easily and it supports easy integration between different projects, programmers will be helped a lot.

Step : 1   The Code goes here :->

 Firstly add this script on designing page as below given.

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
 
 
Step : 2  Design Code here :->

<div>
   <CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server">
   </CKEditor:CKEditorControl>
</div>
 
 
 Step : 3  CS Code here :->

protected void Button1_Click(object sender, EventArgs e)
        {
            string str = CKEditor1.Text;
            string str1 = Server.HtmlEncode(str);
            string str2 = Server.HtmlDecode(str);
            lblText.Text = str2;
        } 
 
  DEMO:-




 


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

How to get a table Script

 Unknown     2:10 AM     tables     No comments   

Intoduction :- 


Hii Friends...

Today I explain how to get a table Script when we not get this manually then we use this code. In this code we only change a table name that you want and execute it . You will get that table Script . 


Step : 1   The Code goes here :->

DECLARE @table_name SYSNAME
SELECT @table_name = 'dbo.Tbl_User_LoginDetail'

DECLARE
      @object_name SYSNAME
    , @object_id INT

SELECT
      @object_name = '[' + s.name + '].[' + o.name + ']'
    , @object_id = o.[object_id]
FROM sys.objects o WITH (NOWAIT)
JOIN sys.schemas s WITH (NOWAIT) ON o.[schema_id] = s.[schema_id]
WHERE s.name + '.' + o.name = @table_name
    AND o.[type] = 'U'
    AND o.is_ms_shipped = 0

DECLARE @SQL NVARCHAR(MAX) = ''

;WITH index_column AS
(
    SELECT
          ic.[object_id]
        , ic.index_id
        , ic.is_descending_key
        , ic.is_included_column
        , c.name
    FROM sys.index_columns ic WITH (NOWAIT)
    JOIN sys.columns c WITH (NOWAIT) ON ic.[object_id] = c.[object_id] AND ic.column_id = c.column_id
    WHERE ic.[object_id] = @object_id
)
SELECT @SQL = 'CREATE TABLE ' + @object_name + CHAR(13) + '(' + CHAR(13) + STUFF((
    SELECT CHAR(9) + ', [' + c.name + '] ' +
        CASE WHEN c.is_computed = 1
            THEN 'AS ' + cc.[definition]
            ELSE UPPER(tp.name) +
                CASE WHEN tp.name IN ('varchar', 'char', 'varbinary', 'binary', 'text')
                       THEN '(' + CASE WHEN c.max_length = -1 THEN 'MAX' ELSE CAST(c.max_length AS VARCHAR(5)) END + ')'
                     WHEN tp.name IN ('nvarchar', 'nchar', 'ntext')
                       THEN '(' + CASE WHEN c.max_length = -1 THEN 'MAX' ELSE CAST(c.max_length / 2 AS VARCHAR(5)) END + ')'
                     WHEN tp.name IN ('datetime2', 'time2', 'datetimeoffset')
                       THEN '(' + CAST(c.scale AS VARCHAR(5)) + ')'
                     WHEN tp.name = 'decimal'
                       THEN '(' + CAST(c.[precision] AS VARCHAR(5)) + ',' + CAST(c.scale AS VARCHAR(5)) + ')'
                    ELSE ''
                END +
                CASE WHEN c.collation_name IS NOT NULL THEN ' COLLATE ' + c.collation_name ELSE '' END +
                CASE WHEN c.is_nullable = 1 THEN ' NULL' ELSE ' NOT NULL' END +
                CASE WHEN dc.[definition] IS NOT NULL THEN ' DEFAULT' + dc.[definition] ELSE '' END +
                CASE WHEN ic.is_identity = 1 THEN ' IDENTITY(' + CAST(ISNULL(ic.seed_value, '0') AS CHAR(1)) + ',' + CAST(ISNULL(ic.increment_value, '1') AS CHAR(1)) + ')' ELSE '' END
        END + CHAR(13)
    FROM sys.columns c WITH (NOWAIT)
    JOIN sys.types tp WITH (NOWAIT) ON c.user_type_id = tp.user_type_id
    LEFT JOIN sys.computed_columns cc WITH (NOWAIT) ON c.[object_id] = cc.[object_id] AND c.column_id = cc.column_id
    LEFT JOIN sys.default_constraints dc WITH (NOWAIT) ON c.default_object_id != 0 AND c.[object_id] = dc.parent_object_id AND c.column_id = dc.parent_column_id
    LEFT JOIN sys.identity_columns ic WITH (NOWAIT) ON c.is_identity = 1 AND c.[object_id] = ic.[object_id] AND c.column_id = ic.column_id
    WHERE c.[object_id] = @object_id
    ORDER BY c.column_id
    FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 2, CHAR(9) + ' ')
    + ISNULL((SELECT CHAR(9) + ', CONSTRAINT [' + k.name + '] PRIMARY KEY (' +
                    (SELECT STUFF((
                         SELECT ', [' + c.name + '] ' + CASE WHEN ic.is_descending_key = 1 THEN 'DESC' ELSE 'ASC' END
                         FROM sys.index_columns ic WITH (NOWAIT)
                         JOIN sys.columns c WITH (NOWAIT) ON c.[object_id] = ic.[object_id] AND c.column_id = ic.column_id
                         WHERE ic.is_included_column = 0
                             AND ic.[object_id] = k.parent_object_id
                             AND ic.index_id = k.unique_index_id   
                         FOR XML PATH(N''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 2, ''))
            + ')' + CHAR(13)
            FROM sys.key_constraints k WITH (NOWAIT)
            WHERE k.parent_object_id = @object_id
                AND k.[type] = 'PK'), '') + ')'  + CHAR(13)

PRINT @SQL





Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Sunday, October 25, 2015

How to make over-out event with js

 Unknown     2:51 AM     js     No comments   

Intoduction :-

Hii Friends...

Today I explain how to make over-out event with the help of java-script. In asp.net there are many events like mouse-over,mouse-down,key press etc. So I explain this with the code.

Step : 1   The Code goes here :->
<script>
    function b(x) {
        x.style.height = "250px";
        x.style.width = "250px";
    }
    function n(x) {
        x.style.height = "150px";
        x.style.width = "150px";
    }
</script>
<img onmouseover="b(this)" onmouseout="n(this)" src="img.jpg" width="32" height="32" />
  DEMO:-
                                                        1) When mouse out


                                                        2) When mouse over


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Wednesday, October 21, 2015

How to convert lower case to upper case

 Unknown     9:31 AM     html, js     No comments   

Intoduction :-

Hii Friends...

Today I explain how to convert lower case words to upper case . This task we can complete with the help of events. in asp.net there are many events like mouse-over,mouse-down,key press etc. So I explain this with the code.

Step : 1   The Code goes here :->
<html>
<head>
<script type="text/javascript">
function uppercase(x)
{
var y=document.getElementById(x).value;
document.getElementById(x).value=y.toUpperCase();
}
</script>
Enter your name<input type="text" id=x onkeyup="uppercase(this.id)">

</head>


</html>
  DEMO:-


Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Newer Posts Older Posts Home

Popular Posts

  • Asp.net insert, Edit, update, delete in grid view
    Introduction :   Here I explain how to insert, edit, update and delete data in grid view using asp.net. In this project I use so...
  • Angular Expressions
    Intoduction :-   Hii Friends... Today I explain about angular js expressions. this is similar to JavaScript expressions. 1) The expr...
  • Basic of css.
    Introduction :- Hii Friends..   Today I explain what is Css and why we use Css and the basic structure of css. so here I               ...
  • stored procedure with case and actions
    Intoduction :- Hii Friends... Today I  explain how to use case and action in stored procedure .  CREATE Proc [dbo].[Proc_ManageRatingA...
  • How to create pikachu character using HTML & CSS
    Hii Friends... Today I explain how to create cartoon( Pikachu character) using HTML and CSS . you can use this code in your project cop...
  • How To Make Semi-Transparent Buttons
    Intoduction :-   Hii Friends...   Today I explain how to make Semi-Transparent Buttons with the help of css. This style now a days goes t...
  • Create a Cart Popup div in HTML & CSS
    Intoduction :-   Hii Friends... Today I explain how to Create a Cart Popup div in HTML & CSS . This moduel base on mouse hover when y...
  • Awarepedia services
    Intoduction :-   Hii Friends...   Today I explain services of awarepedia.com  . Awarepedia is a online software development company and the...
  • How To scroll from bottom to top
    Intoduction :- Hii Friends...   Today I explain How To scroll from top to bottom and bottom to top, we use “scrollTop” function of jque...
  • Auto-Hiding Navbar with Javascript
    Intoduction :-   Hii Friends... today i explain how to hide a navbar when scroll the page. Fixed headers are fairly common nowadays with...

Blog Archive

  • ►  2017 (13)
    • ►  December (1)
    • ►  March (5)
    • ►  February (1)
    • ►  January (6)
  • ►  2016 (31)
    • ►  November (1)
    • ►  September (1)
    • ►  June (6)
    • ►  May (3)
    • ►  April (2)
    • ►  March (8)
    • ►  February (9)
    • ►  January (1)
  • ▼  2015 (31)
    • ▼  December (3)
      • How to to toggle with js
      • How to make rounded corners in Css
      • Border style in css
    • ►  November (4)
      • stored procedure with case and actions
      • Some tricks for stored procedures
      • How to make ck editor in Asp.net
      • How to get a table Script
    • ►  October (18)
      • How to make over-out event with js
      • How to convert lower case to upper case
    • ►  September (6)

About Me

Unknown
View my complete profile

Copyright © Asp.net modules | Powered by Blogger
Design by Sheetal Khandelwal