Subject: The Button_Click event
Posted By: grstad Post Date: 6/2/2008 4:48:08 PM
Hei!

protected void Button_Click(object sender, System.EventArgs e)

{
      How do I redirect to another page? What will the procedure be?
}


And how do I decide or control which page to be the next after use of the Log-In-control (And the Web Site Administration Tool?

And why can't I resize or move a ContentPlaceHolder?

Mvh
grstad
Reply By: dparsons Reply Date: 6/2/2008 8:40:00 PM
The first question is extremely basic and a very simple google query such as: ASP.NET - How do I redirect to another page?  would have garnered you the information you are looking for, so go and try that.  

The second question, I believe, is related to FormsAuthentication.  After you have validated the users credentials you can use this method:

FormsAuthentication.RedirectFromLoginPage(<username>, <create persistant cookie: true|false>);

I am not sure what you are asking about for the Web Site Admin tool.

You CAN move and resize the ContentPlaceHolders as long as you are trying to do it from within your MasterPage.  If you could move and resize Placeholders on child pages it would defeat the purpose of having a MasterPage in the first place.

hth.
-Doug

===========================================================
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
===========================================================
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
===========================================================
Reply By: grstad Reply Date: 6/4/2008 4:52:57 AM
...ok, my questions are basic. But to what extent can VBScript go along with ASP.NET with C#? I did not know it did at all.

On the other hand; basic questions does often appeal to a wide range of the readers. Answers to these basic questions also bring about answers related new and other topics. Perhaps.

Thank you for the answers.

Mvh
grstad
Reply By: planoie Reply Date: 6/4/2008 8:56:56 AM
VBScript is not part of .NET.  VB.NET is.  VB.NET and C# are two languages designed around the Common Language Specification (CLS) that result in intermediate code in MSIL ([M]icro[s]oft [I]ntermediate [L]anguage) that is executable in the Common Language Runtime (CLR).  VBScript requires the VBScript processing engine and is what is used primarily with Classic ASP.

-Peter
compiledthoughts.com
Reply By: dparsons Reply Date: 6/4/2008 9:00:22 AM
Basic questions do appeal to a wide range of readers, you are correct, however when you post such a basic question it sends the message that you are possibly lazy and not willing to do research on your own and simply want "the answer".  Now I don't mean to say that you are lazy, I don't personally know you after all, but the way that you phrased your question gave me the impression that you did no research on your own to first come to some sort of answer or conclusion.

To answer your question about VBScript, you could incorporate VBScript into your applications in much the same way that you incorporate JavaScript: as a client side scripting language.  It can not be incorporated directly into your class files to provide any server side functionality however.

hth.
Doug

===========================================================
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
===========================================================
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
===========================================================
Reply By: planoie Reply Date: 6/4/2008 9:08:06 AM
To add a bit to Doug's comment:
quote:
Originally posted by dparsons

...you could incorporate VBScript into your applications in much the same way that you incorporate JavaScript: as a client side scripting language.

However, this is limited to Internet Explorer as a client platform.  Other browsers won't run client-side VBScript.  JavaScript is the de facto standard.

-Peter
compiledthoughts.com

Go to topic 71854

Return to index page 1