arneweise77
Programmer
Hi!
I´m using vb.net together with asp.net and I´ve encuntered a problem. Basically what I want to do is read and write cookies with asp.net, I write a httpcookie and put some info about it in a listbox, then the user can select and delete that cookie.
Did this using asp.net only but then I needed to postback the page twice(?) to let the server know that the cookie expired.
So now I´m trying to delete the cookie with javascript and then do the postback. Tried this with delButton.Attributes.Add("OnClick", "javascript:delCookie();", but then asp.net sub don´t run. Postback occurs but it doesn´t run the sub I specified with:
<asp:Button
...
OnClick="delButton_Click"
...>
If I change the "javascript:delCookie();" to "alert('hello');" the postback works as I want!?
Any suggestions??
Thanks!
Arne
I´m using vb.net together with asp.net and I´ve encuntered a problem. Basically what I want to do is read and write cookies with asp.net, I write a httpcookie and put some info about it in a listbox, then the user can select and delete that cookie.
Did this using asp.net only but then I needed to postback the page twice(?) to let the server know that the cookie expired.
So now I´m trying to delete the cookie with javascript and then do the postback. Tried this with delButton.Attributes.Add("OnClick", "javascript:delCookie();", but then asp.net sub don´t run. Postback occurs but it doesn´t run the sub I specified with:
<asp:Button
...
OnClick="delButton_Click"
...>
If I change the "javascript:delCookie();" to "alert('hello');" the postback works as I want!?
Any suggestions??
Thanks!
Arne