Link to home
Start Free TrialLog in
Avatar of goodk
goodkFlag for United States of America

asked on

I am using mssql and c# and javascript and how can i first display and insert new record

For a particular record I do the following, select * from table where recordId=2.  Then I have an automatic way of showing every field of the record with it's value.  

Not sure how to show the new record so I do not have to rewrite the code.

using asp.net but my question is of a general nature.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

For a quick solution, probably you can use gridview control.

Example for ref:
http://www.aspsnippets.com/Articles/Simple-Insert-Select-Edit-Update-and-Delete-in-ASPNet-GridView-control.aspx
Avatar of goodk

ASKER

Not interested in Gridview.
ASKER CERTIFIED SOLUTION
Avatar of silemone
silemone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you might not care for this advice but it is well intentioned:

select * ...
should not be used in production code regardless if asp or c# or even SQL

you are asking for trouble if you assume that whatever software you are using will automatically align all the (now current) columns of a query for you, it's a data security risk too.
Avatar of goodk

ASKER

may be the answer I am looking for is not a possibility.