Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Postback to a gridview on a button click

Posted on 2008-11-03
1
858 Views
Last Modified: 2013-12-17
I've been asked to develop a system to record holiday requests.  I'm completely new to asp.net  so I'm finding it a bit of a struggle.  

At the moment I have a form with two dropdownlists and two text boxes and a button.  The users clicks fills in the form and presses the button and it runs a stored procedure to insert the details into my database.  

What I'm struggling to do or find much information is how to use the information from the controls on the form and populate gridview on the button click.  

Thanks in advance

Dave
0
Comment
Question by:leap29
1 Comment
 
LVL 4

Accepted Solution

by:
Makolyte earned 50 total points
ID: 22868091
What I think you're saying is:
1. You want to read the properties of the controls and write them to your database
2. Show an updated GridView

DropDownList value: dropdownlistname.SelectedItem.Value
TextBox value: textboxname.Text

Next if you want to update the GridView the lazy way, you can just rebind it like this:
dataSourceName = callYourSP()
gridViewName.DataSource = dataSourceName
gridViewName.DataBind()

If you have a small amount of records the lazy way is fine.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

791 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