Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi

 

i want to display a message like added successfully in the same form after clicking a button

and redirect to other form.

how this message gets displayed .

 

plz help

Posted
you can use the javascript alert function to display a message box to the user:

 

<script language="Javascript">

 

<!--

alert ("Message goes in here")

//-->

 

</script>

 

 

i want to display it as text not as message box

Posted
In that case, you could use a label control and set its text property to your desired text when the button is clicked, using the onclick event:

 

Me.Label1.text = "Successful" 'Or something like this

 

i have to display the message and redirect to another form after clicking the button.

how will it be possible to display the text message

 

i have to maintain some delay between displaying the message and redirecting to next form

Posted
Interesting to see if this will work. Considering the label has been rendered to the page and the user is now disconnected from the webserver. You can do a wait page type of thing by overriding the response in the render sub. Or you can do this in javascript.
Posted
After populating the label use:

 

'Will pause for (i think) 1 second (could be 10), but either way set the value
'for the sleep to the time u want
Thread.Sleep(1000) 

 

This simulates a delay then your code to redirect can be placed after

 

No this is not working i gave 10 seconds sleep time , label is not displaying but its redirecting to next page

Posted
Try what I mentioned. That will work.

 

 

could u please explain me in somewhat detail or can u provide me any sample

i am not able to get u r point

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...