954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

"i want used confirm in javascript in code behind"

Hai....

"i want used confirm in javascript in code behind"

i am used confirm button ,,,in code behind.

if the confirm button worked

the function is return the true...

else

the function return the false..

i want to get true and false value for my further proces..

this my code..

Dim popupScript6 As String = ""
'Page.RegisterStartupScript("PopupScript6", popupScript6)

in my codebehind window i want to get "agree" value....

in this popupScript6 used confirm coding is worked...but i wrote return word..this is nothing done..

i ma used return word is not worked..

please how can use this statement..

how can i get return value..

because i got the return value..

then my next code if(true) the redirect to another page...

so please hrlp me...

i am used this code also code..

but the same process done this also return word is used in not working..

this code..

Dim str As StringBuilder = New StringBuilder
str.Append("")
RegisterStartupScript("TicketNumber", str.ToString)

so please help me...

thirunavukaras
Newbie Poster
23 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 
NET-Developer
Newbie Poster
18 posts since May 2007
Reputation Points: 10
Solved Threads: 1
 

Put your JS-code into some function like
function MyFunction()
{
... your code
}

And call this function by onClick event of your button (onClick="if(MyFunction()) { window.location.href='where.you.want.to.redirect'; }")

NET-Developer
Newbie Poster
18 posts since May 2007
Reputation Points: 10
Solved Threads: 1
 

Hi dear....

This is my 1st Post...

RegisterStartupScript("Alert", "")

this is the Best way to call javascript inside the Code....this should b written in Code behind file mean in .apsx.vb file....

I hope that you get Help from the Post...

Bye

Regards
Pushkar

pushkar_it
Newbie Poster
11 posts since Jun 2007
Reputation Points: 10
Solved Threads: 1
 

i am using update pannel ,how to use this function at code behind

Rajasundar
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 
i am using update pannel ,how to use this function at code behind

Hi Raja.
Follow this link

When u want to use RegisterStartUpScript within update panel u need to Call function from ScriptManager not from ClientScript... http://developers.de/blogs/damir_dobric/archive/2007/02/12/RegisterStartupScript-and-RegisterClientScriptBlock-can-work-with-UpdatePanel_3F002100_.aspx

ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), Msg2, True)

pushkar_it
Newbie Poster
11 posts since Jun 2007
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You