Solved

getting id from database

Posted on 2016-11-17
5
36 Views
Last Modified: 2016-11-21
is their any way to get the first id from the database when the site load with table for first time
0
Comment
Question by:karthik80c
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Pawan Kumar
ID: 41892489
first id from the database when the site load with table for first time

Can you explain more , what exactly are you doing ?
0
 

Author Comment

by:karthik80c
ID: 41892531
hi Pawan Kumar Khowal,

i can able to create a view (i,e i can able to select require column and can be inserted in to db with id) for my table.this will be show as drop down list in another page.currently this page is loading without any table for first time.is there any possibility to select first id by default when the page load
0
 
LVL 23

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41895275
When the table is loaded, before that you call the below statement is a sp or you can call it directly.

SELECT TOP 1 Column FROM TableName

Also if you are sure that the value in the table will not change you can also hardcode the value.

Hope it helps !
0
 

Author Comment

by:karthik80c
ID: 41895358
Thank you MR.Pawan Kumar Khowal
0
 
LVL 23

Expert Comment

by:Pawan Kumar
ID: 41895362
Welcome karthik80c !!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Form with Modals 16 42
ASP.net Javascript use multiple sliders 2 16
Entity Framework 7 27
Make an ajax call ithat alters url and updates a listview in asp.net 1 18
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now