Over a million developers have joined DZone.

Setting Focus To A Field In Asp.net

This code does a simple field focus in asp.net.

    Protected Sub setFieldFocus(ByVal ctrl As System.Web.UI.Control)
        Dim s As String = ""
        ClientScript.RegisterStartupScript(Me.GetType, "focus", s)
    End Sub

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
        End If
    End Sub

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}