473,383 Members | 1,874 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,383 software developers and data experts.

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 2272
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.Attributes.Add("onClick","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.OpenModalDialog('default.aspx','');
return false; } this function is entirely up to you. The
btnOpen.Attributes.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.close();

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**********@gmail.com> wrote in message
news:11*********************@j52g2000cwj.googlegro ups.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.Attributes.Add("onClick","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.OpenModalDialog('default.aspx','');
return false; } this function is entirely up to you. The
btnOpen.Attributes.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.close();

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
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...
1
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...
3
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
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...
4
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) ...
1
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,...
0
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...
1
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...
4
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.