MVC Partialview help

2013-04-01 Thread ifumust
 

Hi People...i am fairly new to MVC and have a fundamental implementation
issue.

 

In asp.net webforms..i can have a usercontrol that has a submit
button...when you click submit...you can change the data on that usercontrol
and it will postback to the same page. All good.  

 

Eg a login usercontrol

 

When you login(which ever page you're in), it will post back and change the
user control to 'Welcome back Anthony' for example.

 

How do i do this in MVC?  See below for my code..basically it is returning
to my logon partial view on submit instead of the main page.

 

Main viewHome/Intro

 

The Cool Website

@Html.RenderAction("Logon","Account");  

 





Home



 

 

Controller.

   Function Logon() As ActionResult

Return View(New LogonModel With {.ReturnUrl = Request.RawUrl})

End Function

 

 

Function Logon(ByVal model As LogonModel) As ActionResult

Dim iUserId As Int32

Dim msg As String = ""

Dim sURL As String = model.ReturnUrl

 

If ModelState.IsValid Then

If Common.Functions.Login(model.Username.Trim,
model.Password.Trim, msg, iUserId, BaseProperties.ResellerId, False) Then

 

Return PartialView("Logon", model)

 

Else

model.Username = "test"

ViewData("loginresult") = "login failed"

Return PartialView("Logon", model)

End If

Else

Return PartialView("Logon", model)

End If

 

End Function

 



RE: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Williams, Thomas
Wow Tony - great quote!

Thomas

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Tony Wright
Sent: Tuesday, 2 April 2013 12:04 PM
To: ozDotNet
Subject: Re: [OT] Surface RT or Surface Pro?

actually that said, you pay for what you get. The WinRT device is quite 
limiting, and its only when you hit those limitations that you will feel the 
regret. If you want full flexibility, then you would be better off with the Pro 
device.

Reminds me of a quote:
It's unwise to pay too much, but it's worse to pay too little. When you pay too 
much, you lose a little money - that is all. When you pay too little, you 
sometimes lose everything, because the thing you bought was incapable of doing 
the thing it was bought to do. The common law of business balance prohibits 
paying a little and getting a lot - it can't be done. If you deal with the 
lowest bidder, it is well to add something for the risk you run, and if you do 
that you will have enough to pay for something better.
On Tue, Apr 2, 2013 at 11:38 AM, James Chapman-Smith 
mailto:ja...@chapman-smith.com>> wrote:
I want a fairly portable device that is easier to lug around than my current 
laptop. I expect to get a light-weight device that I can remote into my 
workstations. I anticipate replacing my single laptop with two desktop machines 
- one for work and one for home - and the Surface then becomes my traveling 
device and something that I can place beside the bed to watch TV at night or 
use on the couch to check emails, update facebook, etc. I'll also use the 
Surface as a note taking device at seminars/conferences.

From: ozdotnet-boun...@ozdotnet.com 
[mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Ken Schaefer
Sent: Tuesday, 2 April 2013 10:26
To: ozDotNet
Subject: RE: [OT] Surface RT or Surface Pro?

Do you have any requirements or wants from the device that you're buying?

Cheers
Ken

From: ozdotnet-boun...@ozdotnet.com 
[mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of James Chapman-Smith
Sent: Tuesday, 2 April 2013 10:50 AM
To: ozDotNet
Subject: [OT] Surface RT or Surface Pro?

Hi Folks,

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

What are everyone's thoughts?

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

I thank you for your well thought out ideas in advance.

Cheers.

James.



Peninsula Health - Metropolitan Health Service of the Year 2007 & 2009


Re: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Stephen Price
What ever you get will have shortfalls. It will also be out of date within
a year. (or less). That said, as others have indicated, you need to
identify (if not to us, then to yourself) what you need it for.
No device does it all, so you need to choose based on your personal
requirements. Battery life? Surface RT would do well. Does it have to run
any Windows apps or just Windows store apps. (That would decide for you).
Where do you use it? I rarely use a laptop without it plugged into power,
so battery life is not an issue for me (with a laptop) but with a tablet I
want the thing to still have a charge if I've not used it for a day or two.
I have an Asus Vivo Tab, and a Surface RT. To be honest, as impressive as
the surface is, I feel I like the Vivo more. It's laptop feel is more
convenient if you want to use it on your lap. The keyboard is more usable
and has a battery in it to extend the life of the battery in the screen. It
can detach and be a tablet. (which is way lighter than the surface when it
has its keyboard detatched... in fact even with its keyboard they are about
the same weight).
I'm sure there are other options around so have a look and try some out.

good luck :)


On Tue, Apr 2, 2013 at 7:49 AM, James Chapman-Smith  wrote:

>  Hi Folks,
>
> ** **
>
> I'm thinking about getting myself either a Surface RT or a Surface Pro (or
> maybe some other alternative). Every time I think about it I convince
> myself that one is better than the other but then the next time I flip.***
> *
>
> ** **
>
> What are everyone's thoughts?
>
> ** **
>
> Should I get a Surface RT or a Surface Pro? Should I get a surface at all?
> How much memory should I get?
>
> ** **
>
> I thank you for your well thought out ideas in advance.
>
> ** **
>
> Cheers.
>
> ** **
>
> James.
>


Re: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Tony Wright
actually that said, you pay for what you get. The WinRT device is quite
limiting, and its only when you hit those limitations that you will feel
the regret. If you want full flexibility, then you would be better off with
the Pro device.

Reminds me of a quote:
It's unwise to pay too much, but it's worse to pay too little. When you pay
too much, you lose a little money — that is all. When you pay too little,
you sometimes lose everything, because the thing you bought was incapable
of doing the thing it was bought to do. The common law of business balance
prohibits paying a little and getting a lot — it can't be done. If you deal
with the lowest bidder, it is well to add something for the risk you run,
and if you do that you will have enough to pay for something better.

On Tue, Apr 2, 2013 at 11:38 AM, James Chapman-Smith <
ja...@chapman-smith.com> wrote:

>  I want a fairly portable device that is easier to lug around than my
> current laptop. I expect to get a light-weight device that I can remote
> into my workstations. I anticipate replacing my single laptop with two
> desktop machines – one for work and one for home – and the Surface then
> becomes my traveling device and something that I can place beside the bed
> to watch TV at night or use on the couch to check emails, update facebook,
> etc. I'll also use the Surface as a note taking device at
> seminars/conferences.
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ken Schaefer
> *Sent:* Tuesday, 2 April 2013 10:26
> *To:* ozDotNet
> *Subject:* RE: [OT] Surface RT or Surface Pro?
>
> ** **
>
> Do you have any requirements or wants from the device that you’re buying?*
> ***
>
> ** **
>
> Cheers
>
> Ken
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [
> mailto:ozdotnet-boun...@ozdotnet.com ] *On
> Behalf Of *James Chapman-Smith
> *Sent:* Tuesday, 2 April 2013 10:50 AM
> *To:* ozDotNet
> *Subject:* [OT] Surface RT or Surface Pro?
>
> ** **
>
> Hi Folks,
>
> ** **
>
> I'm thinking about getting myself either a Surface RT or a Surface Pro (or
> maybe some other alternative). Every time I think about it I convince
> myself that one is better than the other but then the next time I flip.***
> *
>
> ** **
>
> What are everyone's thoughts?
>
> ** **
>
> Should I get a Surface RT or a Surface Pro? Should I get a surface at all?
> How much memory should I get?
>
> ** **
>
> I thank you for your well thought out ideas in advance.
>
> ** **
>
> Cheers.
>
> ** **
>
> James.
>


Re: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Tony Wright
well RT does have a Remote Desktop App I believe...

On Tue, Apr 2, 2013 at 11:38 AM, James Chapman-Smith <
ja...@chapman-smith.com> wrote:

>  I want a fairly portable device that is easier to lug around than my
> current laptop. I expect to get a light-weight device that I can remote
> into my workstations. I anticipate replacing my single laptop with two
> desktop machines – one for work and one for home – and the Surface then
> becomes my traveling device and something that I can place beside the bed
> to watch TV at night or use on the couch to check emails, update facebook,
> etc. I'll also use the Surface as a note taking device at
> seminars/conferences.
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Ken Schaefer
> *Sent:* Tuesday, 2 April 2013 10:26
> *To:* ozDotNet
> *Subject:* RE: [OT] Surface RT or Surface Pro?
>
> ** **
>
> Do you have any requirements or wants from the device that you’re buying?*
> ***
>
> ** **
>
> Cheers
>
> Ken
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [
> mailto:ozdotnet-boun...@ozdotnet.com ] *On
> Behalf Of *James Chapman-Smith
> *Sent:* Tuesday, 2 April 2013 10:50 AM
> *To:* ozDotNet
> *Subject:* [OT] Surface RT or Surface Pro?
>
> ** **
>
> Hi Folks,
>
> ** **
>
> I'm thinking about getting myself either a Surface RT or a Surface Pro (or
> maybe some other alternative). Every time I think about it I convince
> myself that one is better than the other but then the next time I flip.***
> *
>
> ** **
>
> What are everyone's thoughts?
>
> ** **
>
> Should I get a Surface RT or a Surface Pro? Should I get a surface at all?
> How much memory should I get?
>
> ** **
>
> I thank you for your well thought out ideas in advance.
>
> ** **
>
> Cheers.
>
> ** **
>
> James.
>


RE: [OT] Surface RT or Surface Pro?

2013-04-01 Thread James Chapman-Smith
I want a fairly portable device that is easier to lug around than my current 
laptop. I expect to get a light-weight device that I can remote into my 
workstations. I anticipate replacing my single laptop with two desktop machines 
- one for work and one for home - and the Surface then becomes my traveling 
device and something that I can place beside the bed to watch TV at night or 
use on the couch to check emails, update facebook, etc. I'll also use the 
Surface as a note taking device at seminars/conferences.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Ken Schaefer
Sent: Tuesday, 2 April 2013 10:26
To: ozDotNet
Subject: RE: [OT] Surface RT or Surface Pro?

Do you have any requirements or wants from the device that you're buying?

Cheers
Ken

From: ozdotnet-boun...@ozdotnet.com 
[mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of James Chapman-Smith
Sent: Tuesday, 2 April 2013 10:50 AM
To: ozDotNet
Subject: [OT] Surface RT or Surface Pro?

Hi Folks,

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

What are everyone's thoughts?

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

I thank you for your well thought out ideas in advance.

Cheers.

James.


Re: [OT] Surface RT or Surface Pro?

2013-04-01 Thread jasion4
Hi


I got an RT when they came out, been mostly happy with it, good battery life. I 
got it mainly so I had an RT device to test my apps on + to use as a consumer 
device and for those uses I can’t complain.


I also have touch cover, if your gonna do lots of typing then you might want to 
consider type cover instead.


Jason



Sent from Windows Mail



From: Nathan Chere
Sent: ‎Tuesday‎, ‎2‎ ‎April‎ ‎2013 ‎7‎:‎55‎ ‎AM
To: ozDotNet



Pointless question without saying what you want to do with it.

 

For my money there’s no reason to get a Surface RT at all and very few reasons 
for a Surface Pro.

 



From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of James Chapman-Smith
Sent: Tuesday, 2 April 2013 10:50 AM
To: ozDotNet
Subject: [OT] Surface RT or Surface Pro?

 

Hi Folks,

 

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

 

What are everyone's thoughts?

 

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

 

I thank you for your well thought out ideas in advance.

 

Cheers.

 

James.

 

Click here to report this email as spam.



This message has been scanned for malware by Websense. www.websense.com

RE: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Nathan Chere
Pointless question without saying what you want to do with it.

For my money there's no reason to get a Surface RT at all and very few reasons 
for a Surface Pro.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of James Chapman-Smith
Sent: Tuesday, 2 April 2013 10:50 AM
To: ozDotNet
Subject: [OT] Surface RT or Surface Pro?

Hi Folks,

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

What are everyone's thoughts?

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

I thank you for your well thought out ideas in advance.

Cheers.

James.


Click here to report 
this email as spam.


This message has been scanned for malware by Websense. www.websense.com


RE: [OT] Surface RT or Surface Pro?

2013-04-01 Thread Ken Schaefer
Do you have any requirements or wants from the device that you're buying?

Cheers
Ken

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of James Chapman-Smith
Sent: Tuesday, 2 April 2013 10:50 AM
To: ozDotNet
Subject: [OT] Surface RT or Surface Pro?

Hi Folks,

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

What are everyone's thoughts?

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

I thank you for your well thought out ideas in advance.

Cheers.

James.


[OT] Surface RT or Surface Pro?

2013-04-01 Thread James Chapman-Smith
Hi Folks,

I'm thinking about getting myself either a Surface RT or a Surface Pro (or 
maybe some other alternative). Every time I think about it I convince myself 
that one is better than the other but then the next time I flip.

What are everyone's thoughts?

Should I get a Surface RT or a Surface Pro? Should I get a surface at all? How 
much memory should I get?

I thank you for your well thought out ideas in advance.

Cheers.

James.