DotNet Solution

  • Home
  • Asp.net
    • Controls
    • DataControl
    • Ajax
  • Web Design
    • Html
    • Css
    • Java Script
  • Sql
    • Queries
    • Function
    • Stored Procedures
  • MVC
    • OverView
    • Create First Application
  • BootStrap
    • Collapse Function

Tuesday, 7 June 2016

Ajax FilteredTextBox Extender

  Unknown       00:11       Ajax       No comments    

How To Use FilterTextBoxIn Asp.net.
SOURCE OF PAGE
Firstly Add  Directory on page

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"  TagPrefix="asp" %> 
Only Restrict For Upper case
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager> 

<asp:TextBox ID="txtUpperCase" runat="server"/>
 <asp:FilteredTextBoxExtender ID="UpperCase" runat="server" TargetControlID="txtUpperCase"        FilterType="UppercaseLetters"> </asp:FilteredTextBoxExtender>
  OutPut-
Show UpperCase Letetr In Text box.

Only Restrict For Lower case
<asp:TextBox ID="txtLowerCase" runat="server"/>
<asp:FilteredTextBoxExtender ID="LowerCase" runat="server" TargetControlID="txtLowerCase"
  FilterType="LowercaseLetters"> </asp:FilteredTextBoxExtender>

OutPut-
    Show LowerCase Letetr In Text box .


Only Restrict For Numeric Value
<asp:TextBox ID="txtNumbers" runat="server"/
<asp:FilteredTextBoxExtender ID="Numbers"  runat="server"  TargetControlID="txtNumbers"     FilterType="Numbers" </asp:FilteredTextBoxExtender>

OutPut-
 Show Numbers In Text box

 To Restrict certain or special characters
<asp:TextBox ID="TextBox1" runat="server"/>
<asp:FilteredTextBoxExtender ID="Custome" runat="server" TargetControlID="TextBox1"
   FilterMode="InvalidChars"  InvalidChars="!@#$%^&amp;*()~?><|\';:">
</asp:FilteredTextBoxExtender>

OutPut-
InvalidChar Not Enter In Text box.We Can Give Valid Character Same like As Ex.


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

Friday, 29 April 2016

Calender Control In Ajax

  Unknown       22:48       Ajax       No comments    


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="CalendarExtenderPlus" Namespace="AjaxControlToolkitPlus" TagPrefix="ajaxToolkit" %>

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<asp:TextBox ID="txtTimeIn" runat="server"  AutoPostBack="true"></asp:TextBox> <ajaxToolkit:CalendarExtender ID="Calendar1" ClientIDMode="AutoID" runat="server" Format="dd/MM/yyyy" TargetControlID="txtTimeIn">
                                </ajaxToolkit:CalendarExtender>                               
</form>
 
 Restrict the calendar to only allow selection of the current date only not  previous date and next Date.
 C# Code
Calendar1.StartDate = DateTime.Today;
Calendar1.EndDate = DateTime.Today;
 
If Calander in Girdview then use on Row Data Bound
 protected void Girdview1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
     if (e.Row.RowType == DataControlRowType.DataRow)
        {
            (e.Row.FindControl("Calendar1") as AjaxControlToolkit.CalendarExtender).StartDate = DateTime.Today;
            (e.Row.FindControl("Calendar1") as AjaxControlToolkit.CalendarExtender).EndDate = DateTime.Today; 
 }
} 
 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Wednesday, 30 March 2016

Alter Query

  Unknown       00:50       Queries       No comments    

To add a column in a table, use Alter Query the following syntax:

ALTER TABLE table_name
ADD column_name datatype.

To delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column)

ALTER TABLE table_name
DROP COLUMN column_name.

To change the data type of a column in a table, use the following syntax:
ALTER TABLE table_name

MODIFY COLUMN column_name datatype.
(InMySql)

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

Tuesday, 29 March 2016

  Unknown       04:03       Queries       No comments    

CHECK WHETHER DUPLICATE EATERY

IF((SELECT COUNT(*) FROM TableName WHERE ColumnName=@ColumnName AND ColumnName1=@ColumnName1) > 0)
BEGIN   
 SELECT '! Exit'
 return
 END
 ELSE
 SELECT '! Not Exit'  

Write this code then we can't face duplicate entry
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Tuesday, 15 March 2016

  Unknown       22:24       Queries       No comments    

The INSERT INTO statement is used to insert new records in a table.
Syntax:-
  INSERT INTO table_name (column1,column2,column3,...)
  VALUES (value1,value2,value3,...);

 The DELETE statement is used to DELETE  records in a table.
Syntax:-
  DELETE FROM table_name
  WHERE some_column=some_value; 

The UPDATE  statement is used to UPDATE  records in a table.
Syntax:-
  UPDATE table_name
  SET column1=value1,column2=value2,...
  WHERE some_column=some_value;
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Sunday, 13 March 2016

  Unknown       22:17       Queries       No comments    

SQL SELECT Query
The SELECT statement is used to select data from a database.
Query
SELECT * FROM TABLE NAME.
Use this query we get All data of Table. And we Want to particular data then use Select Column Name
Example.

SELECT column_name,column_name
FROM table_name;
 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+

Tuesday, 1 March 2016

How To Timer Work in Asp.net

  Unknown       21:19       Ajax       No comments    

Using a Timer Control Inside an UpdatePanel Control

When the Timer control is included inside an UpdatePanel control, the Timer control automatically works as a trigger for the UpdatePanel control. You can override this behavior by setting the ChildrenAsTriggers property of the UpdatePanel control to false.
For Timer controls inside an UpdatePanel control, the JavaScript timing component is re-created only when each postback finishes. Therefore, the timed interval does not start until the page returns from the postback. For instance, if the Interval property is set to 60,000 milliseconds (60 seconds) but the postback takes 3 seconds to complete, the next postback will occur 63 seconds after the previous postback.
The following example shows how to include a Timer control inside an UpdatePanel control.

<asp:ScriptManager runat="server" id="ScriptManager1" />
<asp:UpdatePanel runat="server" id="UpdatePanel1" 
    UpdateMode="Conditional">
  <contenttemplate>
    <asp:Timer id="Timer1" runat="server"
      Interval="120000" 
      OnTick="Timer1_Tick">
    </asp:Timer>
  </contenttemplate>
</asp:UpdatePanel>

Using a Timer Control Outside an UpdatePanel Control

When the Timer control is outside an UpdatePanel control, you must explicitly define the Timer control as a trigger for the UpdatePanel control to be updated.
If the Timer controls is outside an UpdatePanel control, the JavaScript timing component continues to run as the postback is being processed. For example, if the Interval property is set to 60,000 milliseconds (60 seconds) and the postback takes 3 seconds to complete, the next postback will occur 60 seconds after the previous postback. The user will see the refreshed content in the UpdatePanel control for only 57 seconds.
You must set the Interval property to a value that enables one asynchronous postback to complete before the next postback is initiated. If a new postback is initiated while an earlier postback is being processed, the first postback is canceled.
The following example shows how to use the Timer control outside an UpdatePanel control.
<asp:ScriptManager runat="server" id="ScriptManager1" />
<asp:Timer ID="Timer1" runat="server" Interval="120000" 
  OnTick="Timer1_Tick">
</asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
  <Triggers>
    <asp:AsyncPostBackTrigger ControlID="Timer1" 
        EventName="Tick" />
    </Triggers>
    <ContentTemplate>
      <asp:Label ID="Label1" runat="server" ></asp:Label>
  </ContentTemplate>
</asp:UpdatePanel>
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Newer Posts Older Posts Home

Popular Posts

  • Numeric Value Validation Through JavaScript
    Validate Only Numeric Value Enter In TextBox Using JavaScript function Firstly Write Java Script Function in <head tag> in Asp.Net ...
  • Auto Increment Id in Sql Server
    SQL server identity column values use in table Steps- Firstly Open-> Sql Server Create Table -> First Field Like ID Usually Autoi...
  • Asp.net- MultiView
    MultiView and View controls allow you to divide the content of a page into different groups, displaying only one group at a time. Each Vie...
  • Reset Identity Column in Sql Server
    We Want To Reset Identity Column Then Use Code.If We Delete column By Id Like We delete 5 no id and After Than we Insert New then We get 6...
  • Email Validation In JavaScript
    We use Validation for Email  in Javascript like in above example <!DOCTYPE html> <html> <head> <script> fu...
  • Javascript Regular Expression Email Validate
    Validate Email using Regular Expression In JavaScript- 1. Create Input type Text box and and onclick cal  checkemail function of Javascr...
  • Count Number Of Word In Sql Server
    We Count HowMany Words Present in This String Through Function in Sql Server Then Use This Code CREATE FUNCTION fnCountOccurences     ...
  • Collapse Function Use in Bootstrap.
    Defination  1.  Collapse Means suddenly fall down. 2.  Just add data-toggle="collapse" and a data-target to element to ...
  • Table Structure Acces in Database
    Table Structure Get From  Database in Sql Server If We Want To get Any  Table Structure from Database . Show How Many Column Created and...
  • Open First Application in MVC
    How To Create First Application in MVC.Follows Some Steps-    STEP 1 . Firstly Go Start menu in Computer And Click on Installed Visual s...

Blog Archive

  • ►  2016 ( 36 )
    • ►  February ( 1 )
    • ►  March ( 5 )
    • ►  April ( 1 )
    • ►  June ( 10 )
    • ►  July ( 6 )
    • ►  November ( 8 )
    • ►  December ( 5 )
  • ▼  2017 ( 1 )
    • ▼  January ( 1 )
      • Whats is Jquery
Powered by Blogger.

Categories

  • Ajax
  • AllFunction
  • Controls
  • CreateApplication
  • css
  • Function
  • javascript
  • Js
  • over view
  • OverView
  • Queries
  • StoredProcedures

Text Widget

Sample Text

Pages

  • Home

Copyright © DotNet Solution | Powered by Blogger
Design by Vibha Acharya