Click here to Skip to main content
15,910,787 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: need code for opening new window on button click Pin
Abhishek Sur19-Jan-09 22:58
professionalAbhishek Sur19-Jan-09 22:58 
AnswerRe: need code for opening new window on button click Pin
Vimalsoft(Pty) Ltd19-Jan-09 22:59
professionalVimalsoft(Pty) Ltd19-Jan-09 22:59 
GeneralRe: need code for opening new window on button click Pin
Jas 00719-Jan-09 23:05
Jas 00719-Jan-09 23:05 
GeneralRe: need code for opening new window on button click Pin
J4amieC19-Jan-09 23:07
J4amieC19-Jan-09 23:07 
GeneralRe: need code for opening new window on button click Pin
Vimalsoft(Pty) Ltd19-Jan-09 23:13
professionalVimalsoft(Pty) Ltd19-Jan-09 23:13 
GeneralRe: need code for opening new window on button click Pin
Abhijit Jana19-Jan-09 23:24
professionalAbhijit Jana19-Jan-09 23:24 
GeneralRe: need code for opening new window on button click Pin
Jas 00719-Jan-09 23:28
Jas 00719-Jan-09 23:28 
GeneralRe: need code for opening new window on button click Pin
Sathesh Sakthivel20-Jan-09 0:36
Sathesh Sakthivel20-Jan-09 0:36 
<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
public void Page_Load(Object sender, EventArgs e)
{
// Define the name and type of the client scripts on the page.
String csname1 = "PopupScript";
String csname2 = "ButtonClickScript";
Type cstype = this.GetType();

// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;

// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
{
String cstext1 = "alert('Hello World');";
cs.RegisterStartupScript(cstype, csname1, cstext1, true);
}

// Check to see if the client script is already registered.
if (!cs.IsClientScriptBlockRegistered(cstype, csname2))
{
StringBuilder cstext2 = new StringBuilder();
cstext2.Append("<script type=\"text/javascript\"> function DoClick() {");
cstext2.Append("Form1.Message.value='Text from client script.'} </");
cstext2.Append("script>");
cs.RegisterClientScriptBlock(cstype, csname2, cstext2.ToString(), false);
}
}
</script>
<html >
<head>
<title>ClientScriptManager Example</title>
</head>
<body>
<form id="Form1"
runat="server">
<input type="text" id="Message" /> <input type="button" value="ClickMe" onclick="DoClick()" />
</form>
</body>
</html>

Sathesh.

Blessed is the season which engages the whole world in a conspiracy of love.

General: need code for opening new window on button click Pin
Jas 00720-Jan-09 17:30
Jas 00720-Jan-09 17:30 
GeneralRe: need code for opening new window on button click Pin
Guffa20-Jan-09 14:58
Guffa20-Jan-09 14:58 
AnswerRe: need code for opening new window on button click (without using javascript) Pin
Guffa20-Jan-09 14:55
Guffa20-Jan-09 14:55 
QuestionUrls and Controls Pin
jonhbt19-Jan-09 22:42
jonhbt19-Jan-09 22:42 
AnswerRe: Urls and Controls Pin
J4amieC19-Jan-09 23:09
J4amieC19-Jan-09 23:09 
QuestionAjax Concepts Pin
sbua19-Jan-09 22:26
sbua19-Jan-09 22:26 
AnswerRe: Ajax Concepts Pin
Abhishek Sur19-Jan-09 22:44
professionalAbhishek Sur19-Jan-09 22:44 
AnswerRe: Ajax Concepts Pin
Aman Bhullar19-Jan-09 22:45
Aman Bhullar19-Jan-09 22:45 
AnswerRe: Ajax Concepts Pin
SeMartens19-Jan-09 22:48
SeMartens19-Jan-09 22:48 
AnswerRe: Ajax Concepts Pin
rprateek21-Jan-09 19:26
rprateek21-Jan-09 19:26 
Questionhow can i get the image from iframe?? Pin
ahmedhassan9619-Jan-09 22:21
ahmedhassan9619-Jan-09 22:21 
Questionremove dynamic created control Pin
Miss Maheshwari19-Jan-09 22:00
Miss Maheshwari19-Jan-09 22:00 
AnswerRe: remove dynamic created control Pin
Abhishek Sur19-Jan-09 22:55
professionalAbhishek Sur19-Jan-09 22:55 
QuestionUsing ASP.net as frontend for win32-application? Pin
invictus319-Jan-09 21:39
invictus319-Jan-09 21:39 
AnswerRe: Using ASP.net as frontend for win32-application? Pin
Abhishek Sur19-Jan-09 22:53
professionalAbhishek Sur19-Jan-09 22:53 
GeneralRe: Using ASP.net as frontend for win32-application? Pin
invictus320-Jan-09 0:16
invictus320-Jan-09 0:16 
Questionasp.net button focus probem Pin
amit arun patil19-Jan-09 20:57
amit arun patil19-Jan-09 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.