|
-
Apr 7th, 2003, 03:34 AM
#1
Thread Starter
Junior Member
Asp messagebox
i have some question to ask. Now i want to write the asp.net web application.
how do i popup the message box saying that "Are you sure you want to delete this record?" when the user click the delete button at the web form?
if yes then
delete code
else
delete canceld
end if
second question
how do i popup up the new windows. when the user click the see detail button. i just want to know the popup new ie page code only
thank
-
Apr 7th, 2003, 04:59 AM
#2
Junior Member
you need to do some JavaScript for this.
to open a new window you have to use:
window.open
to ask something from user use
confirm() function
-
Apr 7th, 2003, 02:57 PM
#3
Member
-
Apr 8th, 2003, 07:53 PM
#4
PowerPoster
Why can't you use MsgBox "BLAH" in the code behind module? I dont understand why they took that out.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Apr 8th, 2003, 09:13 PM
#5
PowerPoster
Because the code behind file is only accessed when the page posts back and ran only on the server. The only thing that goes out to the client is html, which isn't that advanced. In your code, you could create a javascript and insert it into a page when it is sent back out to the client, but by then, the reason for the message box is usually past.
-
Aug 8th, 2005, 05:08 AM
#6
Fanatic Member
Re: Asp messagebox
I like the way it works but have you got code example of how you did it.
I need to do a similar thing when a button is pressed.
I want to run VB code, display a message based on the result of the code then run some more vb code based on the result of the message.
Any help would be appreciated.
-
Aug 8th, 2005, 03:29 PM
#7
New Member
Re: Asp messagebox
David - see my reply to your message on this for the solution...
Kev
-
Aug 8th, 2005, 10:59 PM
#8
Fanatic Member
Re: Asp messagebox
you can try adding javascript:
Private Sub dbGrid_ItemCreated(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
'-- record alternating highlights
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.SelectedItem Then
e.Item.Attributes.Add("onclick", "this.style.backgroundColor='beige';this.style.cursor='hand'")
'e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white';")
End If
End Sub
If a post has helped you then Please Rate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|