Ok, 99% sure that I'm doing something stupid here, but if someone can just point me in the right direction, it'll be much appreciated...I used to work with C# but now I have to do a project in VB, so I'm on a bit of a learning curve as far as syntax goes...
Here's my problem:
I have an aspx page, with 1 dropdown and 9 textboxes on it. These controls get populated with default values from a database. Then, when the user changes any of these values, and hits a save button, an UPDATE statement must change the values in the dbase. (SQL Server 2000)
No matter what I try, the orginal values gets persisted and not the new ones. I checked the SQL statement that gets generated and it does only contain the original values, not the new ones.
I think this has something to do with the PostBack or something like that...but I'm to rusty to be sure..
Any help would be appreciated....thanx
VB.Net + ASP.Net --- New problem
VB.Net + ASP.Net --- New problem
Last edited by Mechano on 28 Nov 2006, 18:05, edited 1 time in total.
I got this same problem once.
I can't remember how to fix it though.
I think it had something to do with the page being cached in IE.
Try to add this to the ASPX file header:
I can't remember how to fix it though.
I think it had something to do with the page being cached in IE.
Try to add this to the ASPX file header:
Code: Select all
<% Response.Expires = -1 %>
Thanx guys, but I figured it out...
In the Page_Load section, I did the following:
This ensures that the controls only gets populated when you load the page for the first time, and not every time a post back takes place...
It worked for me...
In the Page_Load section, I did the following:
Code: Select all
If Not Page.IsPostBack Then
'populate fields
Else
'do nothing
End If
It worked for me...
Ok, I have a new problem
Here goes :
I use PNG's fot buttons on my page, because of they're exceptional transparency abilities. Everything seems to be working fine, but only in Mozilla and IE7. IE6 refuses to show transparency for the PNG's....
I found the following fix:
http://homepage.ntlworld.com/bobosola/pnghowto.htm
There is a problem though. The above fix applies to all the <IMG> tags in my document, and not the <asp:ImageButton> tags....Reason being that the <asp:ImageButton> tags do not support the 'style' attribute...
If anyone can help me solve this problem, I won't only be thankful, but MEGA impressed...
I use PNG's fot buttons on my page, because of they're exceptional transparency abilities. Everything seems to be working fine, but only in Mozilla and IE7. IE6 refuses to show transparency for the PNG's....
I found the following fix:
http://homepage.ntlworld.com/bobosola/pnghowto.htm
There is a problem though. The above fix applies to all the <IMG> tags in my document, and not the <asp:ImageButton> tags....Reason being that the <asp:ImageButton> tags do not support the 'style' attribute...
If anyone can help me solve this problem, I won't only be thankful, but MEGA impressed...