• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

C# Refresh ASP Data

I created my first ASP website with C# and passing parameters from the textboxes to sql database.
After I add the data in the textboxes and hit submit it shows up on sql table but it does not show up when I click Back to the the previous page in the dro downs.
The drop downs are connected to the same table.
The data only shows up on the drop downs ONLY if I stop compiling VS and Compile it again. Then I can see the new information in the drop down.

What C# code I can use to insert a button on the first page that would refresh the data in the drop downs?
Please help this is the only thing that is stopping me to proceed!

Paul
0
pauledwardian
Asked:
pauledwardian
  • 3
2 Solutions
 
BuggyCoderCommented:
Fill the drop downs at page_load event....

http://asp-net-example.blogspot.in/2009/03/how-to-data-bind-dropdownlist-on-page.html

PS : please modify the code to fetch data from data base and bind the dd to this data
0
 
pauledwardianAuthor Commented:
Can you provide a code that would bind data in a Refresh button?
0
 
sammySeltzerCommented:
It seems to me that you are confused about dropdowns work.

Can you show the dropdown code you are using?
0
 
pauledwardianAuthor Commented:
Basically the dropdowns are connected to the SQLDatasource. I didnt use code to bind the drop downs to the table. I use the sql data source.
0
 
pauledwardianAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now