startuga Posted August 12, 2013 at 03:34 PM Report #521526 Posted August 12, 2013 at 03:34 PM Boa tarde, Eu tenho este código. Dim con As New SqlConnection("Data Source=xxxxxxx\xxxxx;Initial Catalog=xxxx;User ID=xxxx;pwd=xxxx") con.Open() Dim command As New SqlCommand("UPDATE AREAS SET AREA_ID = @AREA_ID, AREA_CODE = @AREA_CODE, AREA_DESC = @AREA_DESC WHERE (AREA_ID = @AREA_ID)", con) command.Parameters.Add("@AREA_ID", SqlDbType.VarChar).Value = TextBox1.Text command.Parameters.Add("@AREA_CODE", SqlDbType.VarChar).Value = TextBox2.Text command.Parameters.Add("@AREA_DESC", SqlDbType.VarChar).Value = TextBox3.Text command.ExecuteNonQuery() con.Close() End Sub <asp:HyperLinkField DataNavigateUrlFields="AREA_ID,AREA_CODE,AREA_DESC" DataNavigateUrlFormatString = "Edit.aspx?AREA_ID={0}&AREA_CODE={1}&AREA_DESC={2}" Text="Edit/Delete" /> If Not IsPostBack Then Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim strID As String = Request.QueryString("AREA_ID") Dim strCode As String = Request.QueryString("AREA_CODE") Dim strDesc As String = Request.QueryString("AREA_DESC") TextBox1.Text = strID TextBox2.Text = strCode TextBox3.Text = strDesc End If End Sub Se quiser populacionar uma dropdownlist como faço?
Ruka284 Posted August 12, 2013 at 11:34 PM Report #521574 Posted August 12, 2013 at 11:34 PM ve aqui http://www.macoratti.net/aspn_ddl.htm,
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now