Click here to Skip to main content
15,906,645 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Email in ASP.NET Pin
ToddHileHoffer11-Sep-07 5:19
ToddHileHoffer11-Sep-07 5:19 
QuestionNo parameterless constructor defined for this object. Pin
firestoper11-Sep-07 4:48
firestoper11-Sep-07 4:48 
AnswerRe: No parameterless constructor defined for this object. Pin
Pete O'Hanlon11-Sep-07 5:14
mvePete O'Hanlon11-Sep-07 5:14 
AnswerRe: No parameterless constructor defined for this object. Pin
ToddHileHoffer11-Sep-07 5:29
ToddHileHoffer11-Sep-07 5:29 
GeneralRe: No parameterless constructor defined for this object. [modified] Pin
firestoper11-Sep-07 6:18
firestoper11-Sep-07 6:18 
GeneralRe: No parameterless constructor defined for this object. Pin
StylezHouse11-Sep-07 7:43
StylezHouse11-Sep-07 7:43 
GeneralRe: No parameterless constructor defined for this object. Pin
firestoper11-Sep-07 14:35
firestoper11-Sep-07 14:35 
QuestionRegisterStartupScript Pin
Rev T11-Sep-07 3:52
Rev T11-Sep-07 3:52 
I am using RegisterStartupScript to run a javascript and display a modal web form from my code behind page. In vb.net the code is:
strScript = "<script> OpenWebPrompt('The party size and quantitative/qualitative answers require that this request be cancelled. Please speak to a client id for further guidance.','www.cnn.com','Reset','Abort','','');</script>"

Page.RegisterStartupScript("OpenWebPrompt", strScript) where OpenWebPrompt is a javascript in this page.

When the form is displayed all looks OK, but a button is clicked, another instance of the form is displayed and only then is the vbscript of the web form called. I am a new web programmer so i apologize if this is a simple question.

The javascript is:
function OpenWebPrompt(msg, hlink, btn1, btn2, btn3, btn4)
{
var sOptions;

sOptions = "center: Yes; dialogHeight: 550px; dialogWidth: 720px;";

var oArgs = new Object();
oArgs.msg = msg;
oArgs.hlink = hlink;
oArgs.btn1 = btn1;
oArgs.btn2 = btn2;
oArgs.btn3 = btn3;
oArgs.btn4 = btn4;

var url = "../convertedcontrols/webprompt.aspx?msg=" + msg + "&btn1=" + btn1 + "&btn2=" + btn2 + "&btn3=" + btn3 + "&btn4=" + btn4 + "&hlink=" + hlink;

var w = window.showModalDialog(url,"",sOptions);

var objVal = document.getElementById("<%=Me.UniqueID%>_txtPromptReturn");

objVal.text = w

//document.forms(0).submit();

// return w;
}

The webform is:
<%@ AutoEventWireup="false" Codebehind="WebPrompt.aspx.vb" Inherits="CSFB.WebPrompt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>

<script runat="server">
sub btnClick(sender as object, e as system.eventargs)


ctype(sender,button).Text = ctype(sender,button).id & " clicked"

end sub

</script>

<title>WebPrompt</title>

<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>

<asp:Button id="Button4" style="Z-INDEX: 104; LEFT: 280px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Button id="Button3" style="Z-INDEX: 103; LEFT: 200px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>
<asp:Button id="Button2" style="Z-INDEX: 102; LEFT: 128px; POSITION: absolute; TOP: 152px" runat="server"
OnClick="btnClick" Text="Button" Visible="False"></asp:Button>&nbsp;
<asp:Label id="lblMsg" style="Z-INDEX: 105; LEFT: 56px; POSITION: absolute; TOP: 32px" runat="server"
Width="288px" Height="60px"></asp:Label>
<asp:HyperLink id="hlWebLink" style="Z-INDEX: 106; LEFT: 56px; POSITION: absolute; TOP: 104px"
runat="server" Width="384px" Height="16px" Visible="False"></asp:HyperLink>
</form>
</body>
</HTML>



Thanks,

Tim
AnswerRe: RegisterStartupScript Pin
Sandeep Akhare11-Sep-07 3:57
Sandeep Akhare11-Sep-07 3:57 
QuestionHow to save file with some default name without prompting user Pin
here2learn11-Sep-07 2:44
here2learn11-Sep-07 2:44 
QuestionCookies and Session.Abandon() Pin
varshavmane11-Sep-07 2:40
varshavmane11-Sep-07 2:40 
AnswerRe: Cookies and Session.Abandon() Pin
Sandeep Akhare11-Sep-07 3:24
Sandeep Akhare11-Sep-07 3:24 
GeneralRe: Cookies and Session.Abandon() Pin
varshavmane11-Sep-07 3:35
varshavmane11-Sep-07 3:35 
AnswerRe: Cookies and Session.Abandon() Pin
Ahmad Adnan11-Sep-07 3:25
Ahmad Adnan11-Sep-07 3:25 
QuestionConfirmation box onload Pin
munklefish11-Sep-07 1:21
munklefish11-Sep-07 1:21 
AnswerRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 1:51
Sandeep Akhare11-Sep-07 1:51 
GeneralRe: Confirmation box onload Pin
munklefish11-Sep-07 2:16
munklefish11-Sep-07 2:16 
GeneralRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 2:48
Sandeep Akhare11-Sep-07 2:48 
GeneralRe: Confirmation box onload Pin
munklefish11-Sep-07 3:08
munklefish11-Sep-07 3:08 
GeneralRe: Confirmation box onload Pin
Sandeep Akhare11-Sep-07 3:14
Sandeep Akhare11-Sep-07 3:14 
Questiondisplay video in browser Pin
Khawar Abbas111-Sep-07 0:58
Khawar Abbas111-Sep-07 0:58 
AnswerRe: display video in browser Pin
SHatchard11-Sep-07 1:02
SHatchard11-Sep-07 1:02 
AnswerRe: display video in browser Pin
munklefish11-Sep-07 1:28
munklefish11-Sep-07 1:28 
QuestionA4 page size and Image Pin
AnhTin11-Sep-07 0:18
AnhTin11-Sep-07 0:18 
AnswerRe: A4 page size and Image Pin
Christian Graus11-Sep-07 0:24
protectorChristian Graus11-Sep-07 0:24 

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.