473,320 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

prompt

javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting
Nov 16 '05 #1
7 8147
Bill Yin wrote:
javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting


You'll still have to use javascript...

Page.RegisterStartupScript("ClientScript", strScript)

Nov 16 '05 #2
But I use it in winForm ,not in Asp.net....

"Microsoft Towel Boy" <ms*****@boy.towel.spam> ????
news:Yo*****************@newsread2.news.pas.earthl ink.net...
Bill Yin wrote:
javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting


You'll still have to use javascript...

Page.RegisterStartupScript("ClientScript", strScript)

Nov 16 '05 #3
In a Windows Form, you need to create a custom dialog to show the prompt and
allow input. If you just want a simple MessageBox, try
System.Windows.Forms.MessageBox.Show()

-mike
MVP

"Bill Yin" <yi********@yahoo.com.cn.discuss> wrote in message
news:e1**************@TK2MSFTNGP10.phx.gbl...
But I use it in winForm ,not in Asp.net....

"Microsoft Towel Boy" <ms*****@boy.towel.spam> ????
news:Yo*****************@newsread2.news.pas.earthl ink.net...
Bill Yin wrote:
> javascript-- prompt
> C# -- ????
> I want pop a winform for inputting my password before submitting
>
>


You'll still have to use javascript...

Page.RegisterStartupScript("ClientScript", strScript)


Nov 16 '05 #4
Bill, you need to create your own dialog to pass back the data. I have a
simple application that shows this in my tutorial.

http://www.publicjoe.f9.co.uk/csharp/csharp19.html

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html

"Bill Yin" <yi********@yahoo.com.cn.discuss> wrote in message
news:##**************@TK2MSFTNGP11.phx.gbl...
javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting

Nov 16 '05 #5
Hi Bill Yin,

Yeah MessageBox.Show() is the way to go.

There a few parameters which you can used MessageBox.Show()

1 simple example,

MessageBox.Show("Hello Bill Yin");

But you can set the dialog box title bar, the icons used, etc. Good Luck!
--
Regards,
Chua Wen Ching :)
"Michael Giagnocavo [MVP]" wrote:
In a Windows Form, you need to create a custom dialog to show the prompt and
allow input. If you just want a simple MessageBox, try
System.Windows.Forms.MessageBox.Show()

-mike
MVP

"Bill Yin" <yi********@yahoo.com.cn.discuss> wrote in message
news:e1**************@TK2MSFTNGP10.phx.gbl...
But I use it in winForm ,not in Asp.net....

"Microsoft Towel Boy" <ms*****@boy.towel.spam> ????
news:Yo*****************@newsread2.news.pas.earthl ink.net...
Bill Yin wrote:

> javascript-- prompt
> C# -- ????
> I want pop a winform for inputting my password before submitting
>
>

You'll still have to use javascript...

Page.RegisterStartupScript("ClientScript", strScript)



Nov 16 '05 #6
ÄãºÃ
WINFORMÄǸüÊDz»¿ÉÄÜÓÐÏó½Å±¾Ò»ÑùµÄ·½·¨ÁË
ËûÊÇ´°ÌåµÄ¸ÅÄî

--
΢ÈíÉçÇøASP.NET,C#,ADO.NET×é×鳤֮һ!
Ô¸ÎÒÃǹ²Í¬½ø²½!
Nov 16 '05 #7
Dan
Bill,

Simple example:

on Form1 (calling form)

private void button1_Click(object sender, System.EventArgs e)
{
Form2 f2 = new Form2();
if (f2.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(f2.PW);
}
}

on Form2 (prompt/dialog form)

public string PW
{
get
{
return textBox1.Text;
}
}

On Form2 set the DialogResult properties of your buttons to the
appropriate values (OK, Cancel, etc.) so they set the ShowDialog()
return value and close the close the form.

-Dan Shanyfelt

"Bill Yin" <yi********@yahoo.com.cn.discuss> wrote in message news:<##**************@TK2MSFTNGP11.phx.gbl>...
javascript-- prompt
C# -- ????
I want pop a winform for inputting my password before submitting

Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hank | last post by:
Hi, does anyone know how to change the foreground color of the command prompt through python? For example if i was printing out an error message, I would like it to be red where the normal...
12
by: zhi | last post by:
Really confused, when I use keyword style argument as following: >>> input(prompt="hello") Traceback (most recent call last): File "<pyshell#52>", line 1, in -toplevel- input(prompt="hello")...
13
by: JSE | last post by:
Hello everyone. here's what we have in an html file. <form ..... <input type=button name="comment" onclick=" prompt('enter comment',' ' )" > Is there anyway to get the value...
2
by: WStoreyII | last post by:
how do i change the default directory and prompt fo the the .net command prompt for example when i load it i wish the directory to already be desktop and the prompt to be Cmd: thanks ...
7
by: Petesman | last post by:
I am trying to make a prompt that will ask the user for some input... If I just use var input = prompt("dafa") everything works fine but the box is put in the top left corner of the window. I need...
4
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is...
3
by: J.P. Cummins | last post by:
In my ASP.NET application, I wish to have a page for administrators to edit items in a list. Preferably, I would like to use the javascript prompt for the 'rename' function, and a javascript alert...
5
by: hcross | last post by:
This project is a web based html and Javascript site. I am working on mac at the moment. This script works except for attempting to open new window once complete. As you can see, i am new to...
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
4
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.