leo88 0 Junior Poster

Hi, I wants to ask how to pending the coding in code behind before the javascript function is finished execute?

for example:

ScriptManager.RegisterStartupScript(Me, Me.GetType(), Guid.NewGuid().ToString(), "initCard('" & 28 & "');" & Page.ClientScript.GetPostBackEventReference(Me, ""), True)


     Me.Response.Redirect("~/MasterData/StaffMaintain.aspx", False)

From the coding above, I call a javascript function of "initcard()",before redirect the page, i have to wait the javascript to execute finish. Anyone know how to do that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.