Click here to Skip to main content
15,909,324 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to synchronize dropdownlists Pin
Kissy1629-Aug-06 19:52
Kissy1629-Aug-06 19:52 
GeneralRe: how to synchronize dropdownlists Pin
_AK_28-Aug-06 21:33
_AK_28-Aug-06 21:33 
QuestionRSS Feed Pin
venkatasivaramaprasad28-Aug-06 19:13
venkatasivaramaprasad28-Aug-06 19:13 
AnswerRe: RSS Feed Pin
Suresh Pirsquare29-Aug-06 0:59
Suresh Pirsquare29-Aug-06 0:59 
QuestionDatagrid in ajax Pin
alokdotnet28-Aug-06 17:19
alokdotnet28-Aug-06 17:19 
QuestionUsing Asp page in Asp.net Pin
alokdotnet28-Aug-06 17:15
alokdotnet28-Aug-06 17:15 
AnswerRe: Using Asp page in Asp.net Pin
Guffa28-Aug-06 19:04
Guffa28-Aug-06 19:04 
QuestionEnter Text into Detailsview on Insert. Pin
japel28-Aug-06 16:15
japel28-Aug-06 16:15 
Hi All

I have a detailsview in Insert Mode and want to populate the myID field on insert with a new index number.

What I am doing is checking the last index number and adding 1. Then I want to put this value in to the Detailsview myID field in read only so users can not change it.

I want this to happen on the Detailsview_Inserting event. See code below....

<br />
    Protected Sub DetailsView1_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailsView1.ItemInserted<br />
        If DetailsView1.CurrentMode = FormViewMode.Insert Then<br />
            LoadData()<br />
<br />
            'Get max entry in table myID field.<br />
<br />
            'Increment by one.<br />
<br />
            'Add to the myID field in the dateview.<br />
<br />
        End If<br />
    End Sub<br />
    Private Sub LoadData()<br />
        Dim oleConn As New OleDbConnection<br />
        oleConn.ConnectionString = ConfigurationManager.ConnectionStrings("ShowRegDBConnectionString").ConnectionString<br />
<br />
        Dim oleComm As New OleDb.OleDbCommand<br />
        oleComm.Connection = oleConn<br />
<br />
        Try<br />
            oleConn.Open()<br />
<br />
            oleComm.CommandText = ("SELECT Max(myID) FROM SuggestionTB")<br />
            Dim myID As String = Convert.ToString(oleComm.ExecuteScalar())<br />
<br />
            oleConn.Close()<br />
<br />
            LastValue = myID<br />
<br />
        Catch ex As OleDbException<br />
            oleConn.Close()<br />
        End Try<br />
    End Sub<br />


Any ideas....

When people make you see red, be thankful your not colour blind.

QuestionWhy is only my first dropdown list maintains its selection? Pin
littlecuttiepie28-Aug-06 12:37
littlecuttiepie28-Aug-06 12:37 
AnswerRe: Why is only my first dropdown list maintains its selection? Pin
Not Active28-Aug-06 16:50
mentorNot Active28-Aug-06 16:50 
QuestionDrop file extension HttpModule + Login Control Pin
eggsovereasy28-Aug-06 10:59
eggsovereasy28-Aug-06 10:59 
QuestionForm Authentication Pin
Bassam Saoud28-Aug-06 10:32
Bassam Saoud28-Aug-06 10:32 
Questionimporting a swish file into ASP.NET Pin
Insia28-Aug-06 9:02
Insia28-Aug-06 9:02 
QuestionWeb Service vs. Web Form Security Pin
JimmyG1328-Aug-06 7:49
JimmyG1328-Aug-06 7:49 
QuestionWhat is "content file" and "code-behind file" ? Pin
Husam Burhan28-Aug-06 7:16
Husam Burhan28-Aug-06 7:16 
AnswerRe: What is "content file" and "code-behind file" ? Pin
japel28-Aug-06 16:43
japel28-Aug-06 16:43 
QuestionPassing Controls Pin
cisco210328-Aug-06 4:06
cisco210328-Aug-06 4:06 
AnswerRe: Passing Controls Pin
coolestCoder28-Aug-06 4:42
coolestCoder28-Aug-06 4:42 
GeneralRe: Passing Controls Pin
Not Active28-Aug-06 5:13
mentorNot Active28-Aug-06 5:13 
GeneralRe: Passing Controls Pin
cisco210328-Aug-06 5:22
cisco210328-Aug-06 5:22 
GeneralRe: Passing Controls Pin
Not Active28-Aug-06 5:57
mentorNot Active28-Aug-06 5:57 
AnswerRe: Passing Controls Pin
Not Active28-Aug-06 5:11
mentorNot Active28-Aug-06 5:11 
GeneralRe: Passing Controls Pin
cisco210328-Aug-06 5:26
cisco210328-Aug-06 5:26 
GeneralRe: Passing Controls Pin
Not Active28-Aug-06 5:55
mentorNot Active28-Aug-06 5:55 
Questionhi Pin
FREAK880228-Aug-06 4:01
FREAK880228-Aug-06 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.