473,746 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Newbee ASP.NET Questions

Hiya all

Using: ASP.NET Version 1.1

I am learning ASP.NET & would like to know:-

How do I add a Open Browser Dialog behind a server button & validate a
chosen file as a new e-mail attachment?

How do I close an aspx window (client-side)?

How do I set the page when the user visits the site to remove Address Bar &
make the form a fixed size?

Your help would be appreciated
Mar 10 '06 #1
2 2295
Jonny,

Question why dont you use version 2.0? Dont teach yourself legacy
stuff.

Ok, in answer to your questions:

If you have a button called btnOpen you can do it in the following way;
What I normally do is to put a javascript block in the head section of
the page that will open the new page, the reason for this is that a
server button will do a postback, and you dont always want a postback
event to fire, so in the page_load event I put something like this:
btnOpen.Attribu tes.Add("onClic k","return openWindow();") . You will
understand what I am doing here if you know a bit about javascript, but
essentially the openWindow is the javascript function in the head
section which could be anything, but the important thing is alwasy to
return false in this function else you will get a postback event
happening on the page where you clicked the button, and *most* of the
times this is not really needed. So the javascript function can be:
function openWindow() { window.OpenModa lDialog('defaul t.aspx','');
return false; } this function is entirely up to you. The
btnOpen.Attribu tes.Add function essentially binds a client side onClick
event to it.
Now how do you validate a chosen file; well there are tonnes of topics
on this on the web. Try this link:
http://www.codeproject.com/aspnet/fileupload.asp but if this is not
what you are looking for, open google and type, .net file upload and
you will see a lot of help.

Now you cannot close a window client side unless the client wants to,
this is for obvious security reasons. I mean you will not like it if
you browser starts opening and closing windows out of your control, so
the best you can do is to put a button on the page, OR have a
javascript countdown function that will call the famous javascript
window.close(); function. The only real way to do this without client
interaction is to register the window as a control from the 'master'
page; i.e. open the window using javascript but assign it to a variable
and then later on call the variablename.cl ose();

Now the last question; I would not waste any time on this, because in
internet explorer 7 the addressbar will ALWAYS show no matter what you
do. But in google type javascript openmodaldialog and have a look at
it, it will help you.

Good luck Rykie

Mar 10 '06 #2
Thank you so much Rykie!!
"Rykie" <ry**********@g mail.com> wrote in message
news:11******** *************@j 52g2000cwj.goog legroups.com...
Jonny,

Question why dont you use version 2.0? Dont teach yourself legacy
stuff.

Ok, in answer to your questions:

If you have a button called btnOpen you can do it in the following way;
What I normally do is to put a javascript block in the head section of
the page that will open the new page, the reason for this is that a
server button will do a postback, and you dont always want a postback
event to fire, so in the page_load event I put something like this:
btnOpen.Attribu tes.Add("onClic k","return openWindow();") . You will
understand what I am doing here if you know a bit about javascript, but
essentially the openWindow is the javascript function in the head
section which could be anything, but the important thing is alwasy to
return false in this function else you will get a postback event
happening on the page where you clicked the button, and *most* of the
times this is not really needed. So the javascript function can be:
function openWindow() { window.OpenModa lDialog('defaul t.aspx','');
return false; } this function is entirely up to you. The
btnOpen.Attribu tes.Add function essentially binds a client side onClick
event to it.
Now how do you validate a chosen file; well there are tonnes of topics
on this on the web. Try this link:
http://www.codeproject.com/aspnet/fileupload.asp but if this is not
what you are looking for, open google and type, .net file upload and
you will see a lot of help.

Now you cannot close a window client side unless the client wants to,
this is for obvious security reasons. I mean you will not like it if
you browser starts opening and closing windows out of your control, so
the best you can do is to put a button on the page, OR have a
javascript countdown function that will call the famous javascript
window.close(); function. The only real way to do this without client
interaction is to register the window as a control from the 'master'
page; i.e. open the window using javascript but assign it to a variable
and then later on call the variablename.cl ose();

Now the last question; I would not waste any time on this, because in
internet explorer 7 the addressbar will ALWAYS show no matter what you
do. But in google type javascript openmodaldialog and have a look at
it, it will help you.

Good luck Rykie

Mar 11 '06 #3

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

Similar topics

8
1893
by: sikka noel | last post by:
Hi guyz, I rencenly finished by college book on c++. I have done data structures & operating systems as well. I thought that at this point i know C++ completely. However when I go on internet and look for source codes of C++. They have all these wierd LPCSTR unsigned signed dword and all that lingo that i never studied in my college course. and it makes me feel very weak in C++, even though i can write any project in my c++ book very...
1
1238
by: Claude Vernier | last post by:
Hi, I already got a nice Web application running and need to adapt it for iPaqs, Smartphone and Blackberry. Can you suggest a better newsgroup if any and some links to find best practices and help on how to start ?? Among questions: - I want the Default.aspx from the main site to redirect if Windows CE is
3
1529
by: Ross | last post by:
Hi I have bought the book 'Zen of CSS Design' but need some basic tips or links to start me off. I only have basic knowledge where I have set up styles in dreamwever like this ..this_style
4
2625
by: cmc | last post by:
I need some clarification to help me understand the DB2 strucure more. The questions are about "implicit schema" 1. This is a very interest concpet that DB2 let every user to create new schema (as this is part of the PUBLIC group privilege - if I am not wrong). From a practical stand point, what is the application of such concept. 2. Suprisingly, if the schema is an implicitly created, everyone else can create objects in it too. What...
4
1778
by: PerryC | last post by:
All, 1. Do the following codes seem ok? 2. If so, then how do I pull the value of YOE1 and YOE2 into my report? (to do some further calculations) ************************************************* Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer) Dim YOE1 As Double
1
1127
by: Danny Ni | last post by:
Hi, I have questions: (1) To establish web garden, a machine must have mutiple processors. Right? (2) To use ASP.Net session in a web garden environment, process model must be out-of-process, not in-process. Right? (3) How do I change an ASP.Net web application to out-of-process state management? The default is in-process, is it? TIA
0
1309
by: Martin Arvidsson, Visual Systems AB | last post by:
Hi! I have a couple of newbee questions. I have a .aspx page with a couple of TextBoxes and a submit button. Now... When i press the submitbutton i want the data in the TextBoxes to be saved in my Sql Table.
1
2359
by: gimme_this_gimme_that | last post by:
Hello fellow DB2ers! I have a new DB2 Express-C (version 9.5) installation running on Vista Business. I'm able to create new databases using the "create db dbname" command. I'm setting out to configure my DB2 installation so I can establish connections from a web application.
4
3354
by: gimme_this_gimme_that | last post by:
1. What is the syntax to create a node when the server is running on the local machine? Does one still use the word remote? catalog tcpip node webi remote localhost server 50000 2. If I execute "db2 get dbm cfg c:/output.txt" and grep output.txt on SVCENAME I see this:
0
9351
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9286
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8229
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6774
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6062
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4840
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2200
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.