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

Switching Forms

bob
Hi,
Newbie question.
I have a logon Web Form which, once the server has validated the
logon, I want to open up a main form.
i.e. In a windows app I would write something like
if(logon)
{
frmMain f = new frmMain();
f.show();
}
Can I do the equivalent with web forms? If so, how?
thanks
Bob
Aug 27 '08 #1
4 1202
"bob" <st**************@cutthis.adriley.co.nzwrote in message
news:cm********************************@4ax.com...
Newbie question.
Can I do the equivalent with web forms? If so, how?
I appreciate that you are a newbie, but approaching ASP.NET with the mindset
of WinForms is (possibly) the worst approach you could take. The
architectures are *totally* different. I would advise you to get a copy of
this:
http://www.amazon.com/Beginning-ASP-...9407696&sr=8-1
and work your wat through it from cover to cover.

However, to answer your question, you could write something like:

if (logon)
{
Response.Redirect("main.aspx", false);
}
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 27 '08 #2


Hi Mark,
Thank you.
I was wondering if you could comment on my overall approach as the
project is on a tight time table and I don't really have time to
blunder off down the wrong path.

It is a job sheet issuing application.
the default.aspx consumes a Logon Webservice over Https.
This web service passes back a random number as a key and also writes
the key and a 1 hour expiry date to the database via a SPROC

Default.aspx saves the key to the session collection.
I propose that the second page 'main.aspx' will grab the key from the
Session collection and use it as a parameter when it is consuming the
functions of the main webservice over http.
i.e. Getting a list of jobs and posting back progress.

The https / http split is because I have read that Https has
significant performance degradation compared to http. The 'customers'
(employees) will be using the website from remote areas with minimal
bandwidth.
So...
1) They logon.
2) Printout job sheet(s) from Data provided by Main Webservice.
3) Do work and at End of Day logon and update data via Main
webservice.

The 'Data' has yet to be decided. I realise it has to be serializable
but any thoughts on this would be appreciated. i.e. Dataset, XMLDoc,..
I need to balance ease of implementation against performance.

If you think the data aspects make it unsuitable for a thin client I
have the option of writing a thick client. But this ties the app down
to particular PC's. Not a huge problem, but a consideration that is
causing me to go down the thin client path.
Thanks again
Bob.
P.S. I will be away for a couple of days with no NewsGroup access.
Shall catch up when I get back.


On Wed, 27 Aug 2008 08:40:59 +0100, "Mark Rae [MVP]"
<ma**@markNOSPAMrae.netwrote:
>"bob" <st**************@cutthis.adriley.co.nzwrote in message
news:cm********************************@4ax.com.. .
>Newbie question.
Can I do the equivalent with web forms? If so, how?

I appreciate that you are a newbie, but approaching ASP.NET with the mindset
of WinForms is (possibly) the worst approach you could take. The
architectures are *totally* different. I would advise you to get a copy of
this:
http://www.amazon.com/Beginning-ASP-...9407696&sr=8-1
and work your wat through it from cover to cover.

However, to answer your question, you could write something like:

if (logon)
{
Response.Redirect("main.aspx", false);
}
Aug 27 '08 #3
"bob clegg" <cu**********@remooove.xtra.co.nzwrote in message
news:fe********************************@4ax.com...

[top-posting corrected]
>>Newbie question.
Can I do the equivalent with web forms? If so, how?

I appreciate that you are a newbie <snip>

I was wondering if you could comment on my overall approach as the
project is on a tight time table and I don't really have time to
blunder off down the wrong path.
I really can't emphasise strongly enough that, without acquiring at least
some basic ASP.NET skills, you're going to find things *really* difficult.
You may be the best WinForms coder in the world - that won't help you one
iota when it comes to ASP.NET architecture... Since the project is on a
tight timetable, I would strongly advise you to hire a temporary ASP.NET
contractor while you get yourself skilled up...

That said, the app doesn't sound particularly difficult, and your proposed
approach doesn't sound unreasonable...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 27 '08 #4

Hi Mark,
Thanks for your reply.
Maybe I'll write the thick client and buy some time with that.
regards
Bob
On Wed, 27 Aug 2008 12:13:24 +0100, "Mark Rae [MVP]"
<ma**@markNOSPAMrae.netwrote:
>"bob clegg" <cu**********@remooove.xtra.co.nzwrote in message
news:fe********************************@4ax.com.. .

[top-posting corrected]
>>>Newbie question.
Can I do the equivalent with web forms? If so, how?

I appreciate that you are a newbie <snip>

I was wondering if you could comment on my overall approach as the
project is on a tight time table and I don't really have time to
blunder off down the wrong path.

I really can't emphasise strongly enough that, without acquiring at least
some basic ASP.NET skills, you're going to find things *really* difficult.
You may be the best WinForms coder in the world - that won't help you one
iota when it comes to ASP.NET architecture... Since the project is on a
tight timetable, I would strongly advise you to hire a temporary ASP.NET
contractor while you get yourself skilled up...

That said, the app doesn't sound particularly difficult, and your proposed
approach doesn't sound unreasonable...
Aug 31 '08 #5

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

Similar topics

4
by: Baz'noid | last post by:
Hi all, As the size of my database and the number of users grows, i've found a horrible bug in the system with a very simple solution (but i don't know how to implement it)... If two people...
2
by: Paul Mitchell | last post by:
I have taken several individual apps that each use a dsn and combined them into one app. I was wondering if anyone has any sample code that would allow switching between odbc dsn-less connections...
5
by: Jacques Cooper | last post by:
Hello, We developed a C# application. How do you changes views within the same application window? With VC++ you changes views within the same window with the SwitchView method. TIA,
2
by: Johann Blake | last post by:
The following is a bug I have discovered using tab pages and threads and I am looking for a workaround. Create a new Windows Forms application and add a tab control with two tab pages. Add a...
4
by: Jeremy Holt | last post by:
Hi, In a windows.forms application I would BeginInvoke a delegate on the UI thread to collect data from a database. When the call returns to the AsyncCallback, if the Control.InvokeRequired =...
2
by: AllenL | last post by:
Ever since I've been using objects with VB I've instantiated the business object from the form; the business object then creates/destroys data access layer objects as needed. The business object...
3
by: Simon Verona | last post by:
I have a parent form which contains a toolbar. The toolbar controls the loading and switching to of MDI child forms. The code for the toolbar click event and one of the subroutines that loads...
1
by: SamSpide | last post by:
Hi all, I have a moderate-side 'Windows Form Application' (C++) project, with several forms. For some reason switching between code & designer views (right-click ;view code' or 'view...
4
by: K Viltersten | last post by:
We have a project working well today and it's developed on VS2005. Since we're planing to switch to VS2008 in a soon future, i've been trying to move the project to VS2008 Express (Web...
2
by: Olrik | last post by:
I'm having a problem with c# when switching forms. It seems that when i switch from one form to the other they always call Form_load, which I don't want. Im using form.show() and form.hide() so I...
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: 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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.