update record & show form

R

radha

hi friend
Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access
Also how do we show a page from another page,for eg i am in page1.aspx and i have a button inside and if i click on that button it should open a new page,page2.aspx for me. i do some processing (eg write to a dbase) there and i click on ok.Upon clicking page2.aspx should carry out the required processing and return to the original page ie page1.aspx. Response.write doesn`t work because it gives me page2.aspx directly wihout showing me page1.aspx
 
T

Tommy

Question 1:
1. Open a connection to the Access database using the SQLConnection
object.
MSDN has the connection string for Access database.
2. Create a SQLCommand object.
3. Execute your update SQL using the SQLCommand object.

Question 2:
In ASP.NET, it is a very different programming model from classic ASP.
Most elements on the page can be accessed as objects with methods and
properties on the server-side instead of using Response.Write.

In you case, I would do the following:

1. Create an HTML button on Page 1. Set the client-side event
"onclick" to call
javascript "window.location = 'Page2.aspx';".

2. On Page 2, create a Web Control button, and handle the server-side
click
event in the code-behind.

Do the processing you need in your code-behind.
When you're done, do a "Server.Transfer("Page1.aspx")" to transfer
back to
Page 1.

There are many sample code available on MSDN and other popular ASP.NET
websites such as www.asp.net.

Tommy,

radha said:
hi friends
Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access)
Also how do we show a page from another page,for eg i am in
page1.aspx and i have a button inside and if i click on that button it
should open a new page,page2.aspx for me. i do some processing (eg
write to a dbase) there and i click on ok.Upon clicking page2.aspx
should carry out the required processing and return to the original
page ie page1.aspx. Response.write doesn`t work because it gives me
page2.aspx directly wihout showing me page1.aspx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top