Solved

Postback to a gridview on a button click

Posted on 2008-11-03
1
860 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
[X]
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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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