ASp.net

Sunday, January 31, 2016

how to create delete button in asp net




use Below code for delete data from Sql server in asp.net :


Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 
Try Dim RowsAffected As Integer = 0 
con.Open() 
Dim cq As String = String.Format("delete from UnitType where UnitTypeID= {0}", TextBox1.Text) 
cmd = New SqlCommand(cq) With {.Connection = con} 
RowsAffected = cmd.ExecuteNonQuery() 
Label5.Text = "Successfully deleted" 
FillGrid() 
TextBox1.Text = "" 
TextBox2.Text = "" 
If con.State = ConnectionState.Open Then 
con.Close() 
End If 
Catch ex As Exception 
Response.Write(ex.Message) 
End Try 
End Sub

how to use autocomplete in asp net






Use Below Code to show data in Textbox in Asp.net :


<System.Web.Script.Services.ScriptMethod(), System.Web.Services.WebMethod()>
Public Shared Function SearchUnit(ByVal prefixText As String, ByVal count As Integer) As List(Of String) 
Dim con As SqlConnection = New SqlConnection 
con.ConnectionString = ConfigurationManager.ConnectionStrings("MTechSqlDatabaseConnectionString").ConnectionString Dim cmd As SqlCommand = New SqlCommand 
cmd.CommandText = String.Format("select UnitType from UnitType where UnitType LIKE '%{0}%' ", prefixText) ' 
cmd.Parameters.AddWithValue("@ProductName", prefixText) 
cmd.Connection = con 
con.Open()
Dim UnitType As List(Of String) = New List(Of String) 
Dim sdr As SqlDataReader = cmd.ExecuteReader 
While sdr.Read 
UnitType.Add(sdr("UnitType").ToString) 
End While 
con.Close() 
Return UnitType 
End Function



<div> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True"></asp:ScriptManager> <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox> <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" CompletionInterval="100" EnableCaching="False" MinimumPrefixLength="1" ServiceMethod="SearchUnit" TargetControlID="TextBox4"></ajaxToolkit:AutoCompleteExtender> </div>


how to open a page in new tab on button click in asp net





Below Code Open only one new Tab and if you click again it refresh that page: 

Protected Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click Page.ClientScript.RegisterStartupScript(Me.GetType, "OpenWindow", "window.open('UnitType.aspx','_newtab');", True) 
End Sub



Below Code Open new Tab and if you click again it will open another new tab page: 

<asp:Button ID="Button7" runat="server" Text="&gt;&gt;" OnClientClick="document.getElementById('form1').target ='_blank';" /> Protected Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click Response.Redirect("Authors.aspx") End Sub

Wednesday, January 27, 2016

how i can show data select gridview row to textbox in asp net

How to use gridview in asp net

display data in gridview in asp net using vb net

how to use scroll bar in gridview in asp net

how to show empty dropdownlist in asp net

how to display data using drop down list in asp net

DSUM Function In Excell

DMIN Function in Excell

DMAX FUNCTION IN EXCELL

DGET FUNCTION IN EXCELL

DCOUNT FUNCTION IN EXCELL

DAVERAG FUNCTION in Excell

Photoshop Basic Tutorial Type Menu Part 2

Photoshop Basic tutorial Type Menu

Photoshop Basic Tutorial select Menu

Photoshop Basic Tutorial Image Menu

Photoshop Basic Tutorial File menu

Microsoft Word Tutorials - Page Layout

Phothoshop Basic Tutorial Layer Menu

Insert Menu In MS Word Part 5

Insert Menu In MS Word Part 4

Insert Menu In MS Word Part 3

Insert Menu in MS Word Part 2

Insert Menu in MS Word Part-1

MS Word Home Menu full tutorial

how to create a macro in word

ms word print pages in reverse order

how to use the ruler in photoshop

How to use Quick Selection Tool in Photoshop

How to Use Patch Tool In Photoshop

How To Use Note Tool In Photoshop

How To Use Eyedropper in Photoshop

How To Use Brush Tool In Photoshop

TRUNC

TANH

tan function

SUMXMY2

SUMX2PY2

SUMX2MY2

SUMSQ

sumproduct function

sumifs function

sumif function in excel

sum function in excel

SUBTOTAL function in excel

sqrt function in excel

small function in excel

sinh function in excel

sin function in excel

ROUNDUP

rounddown function in excel

round function in excel

Tuesday, January 26, 2016

roman function in excel

random number function in excel

product function

power functions

odd number function in excel

MINA function in excel

min function in excel

maxa function in excel

MAX

large function in excel

int function in excel

day functions in excel

how to use date function in ms excel

Excel DATEDIF Function – Calculate the difference between two dates

how to use year function in excel

how to use today function in excel

how to use time function in excel

how to use second function in excel

how to use the now function in microsoft excel

how to use networkdays function in excel

how to use month function in excel

how to use hour function in excel

how to use days360 function in excel

how to use minute function in excel

FREQUENCY

FLOOR

EVEN

COUNTIFS

COUNTIF

COUNTBLANK

AND Function

IF Function

NOT Function

OR Function

AVEDEV

AVERAGE

AVERAGEA

AVERAGEIF

AVERAGEIFS

CEILING

COUNT

COUNTA

How To Use Magic Wand Tool in Photoshop

how to use healing brush in photoshop

how to crop in photoshop

how to use the rectangular marquee tool in photoshop

how to use Polygonal Lasso tool in Photoshop

how to use Magnetic Lasso tool in Photoshop

how to use lasso tool in photoshop

MVC Tutorial 05 How to Save edit delete and show data use database

MVC Tutorial 04 How to use models

MVC Tutorial 03 How can pass data crontroller to view use ViewData

MVC Tutorial 02 How Can Pass Data Crontroller to view use ViewBag

MVC Tutorial 01 first aspnet mvc application

MM Online Express | Best product Review and Online Marketing site

MM Online Express | Best product Review and Online Marketing site