Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • 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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

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