Record Update Inside of a Masterpage

G

Guest

I am very new to asp.net (I know asp better) and have hit a road block.

I have a master page that links to a content page. The purpose of the
content page is to edit the database record. I have decided to not use
gridview or details view because I need to do some manipulation of the data
and control the look alittle more.

I have a few textboxes on the contentpage and an update button.
When the page loads the textboxes are loaded with the data from the onload
event.

This is my goal:
When a person edits the data and click on the editbutton an onclick event
would read the textbox and get the changed text then display the changes back
to a label.
(if I can display it back to a label then I can execute the store procedure
to do the actual update)


I have tried:
1.
placing the textboxes inside of a <form> tag
but i get a nested form error (I am using a masterpage)

I have also tried:
2.
dim mynewname as string = tbname_tx.text
but that does not get the changed data

2a.
--Is the reason why this is not working because I need a ispostback
statement on the page load event?

Can someone please send me a sample vb code that will read the textboxes and
return the changes values like a request.form would?
 
M

Mark Rae

I have a master page that links to a content page.

In fact, it's the other way round...
This is my goal:
When a person edits the data and click on the editbutton an onclick event
would read the textbox and get the changed text then display the changes
back
to a label.
(if I can display it back to a label then I can execute the store
procedure
to do the actual update)

Why is this necessary? The changed text in the textbox will be retained
during postback - no need to write it to a label...
Is the reason why this is not working because I need a ispostback
statement on the page load event?

Almost certainly but, without seeing your code, it's impossible to tell for
sure...
Can someone please send me a sample vb code that will read the textboxes
and
return the changes values like a request.form would?

Show us your code first...
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top