Click to See Complete Forum and Search --> : PageLayout [Resolved]
RobDog888
Mar 14th, 2005, 03:20 PM
What is the better choice for PageLayout? FlowLayout or GridLayout?
mendhak
Mar 14th, 2005, 08:25 PM
Flow layout. Don't ever use the Grid Layout.
RobDog888
Mar 14th, 2005, 08:32 PM
Thanks, is that because of the absolute positioning of GridLayout?
mendhak
Mar 14th, 2005, 10:19 PM
Yes, that's the reason. With flow layout, you'll be placing your elements in tables and aligning them yourself. You'll have less problems and it's also more appropriate to be doing it that way.
RobDog888
Mar 14th, 2005, 11:58 PM
Ok, thats what I thought. Thanks for taking the time to answer my question :thumb:
mendhak
Mar 15th, 2005, 12:00 AM
My pleasure... any excuse to prevent me from working. :afrog:
Wokawidget
Mar 15th, 2005, 01:51 PM
I just use:
<body>
</body>
Tags, with so layout specified, which means flow layout.
Think the default that .NET adds is:
<body MS_POSITIONING="GridLayout">
I don't know much about HTML, well not compared to people on here anyways. But it's easy to see that using the ASP.NET web form designer is OK, but only to a certain extent.
Learning HTML and the ASP.NET tags means you can design the form exactly how you want, without the .NET designer adding in properties automatically for you which you don't want.
This is completely the opposite from Win32 apps, since you would use the designer, and would never dream of editting the forms file directly in notepad.
Woka
RobDog888
Mar 15th, 2005, 02:21 PM
I used to use Front Page to generate all my tables and controls. Then I would go into the html
and delete all the crap that M$ would add in there. It would make nested tables easier to
create and thats about all. :D
Wokawidget
Mar 15th, 2005, 02:38 PM
Bit like the .NET designer ;)
Here's the code for a simple login page:
<body>
<form id="Form1" method="post" runat="server">
<table width="100%" height="100%">
<tr valign="middle">
<td align="center">
<table>
<tr>
<td>
Username
</td>
<td>
<asp:TextBox id="txtUsername" runat="server" Width="150px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox id="txtPassword" Width="150" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2" align="right"> <asp:Button id="btnLogin" runat="server" Text="Login"></asp:Button>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
[CODE]
Then in the code behind page you have:
[CODE]
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Dim Username As String = txtUsername.Text.Trim
Dim Password As String = txtPassword.Text.Trim
'code to login here
End Sub
Am sorry if you know all this.
Not sure of your level at ASP.NET :(
Slap me if I am insulting you. Haha
Woka
RobDog888
Mar 15th, 2005, 02:47 PM
I dont mind starting at the begining that way I know Im on the right page. Can I slap you anyways :D Jk.
How do I get the dumb editor to stop autocompleting the code tags for me! I
cant paste your code in it keeps changing the cheverons to unicode or ? :mad:
Ps, I think these last tow posts go to my other thread?
RobDog888
Mar 15th, 2005, 03:21 PM
Thanks Woka, but how do I make the logins integrated?
Wokawidget
Mar 15th, 2005, 04:07 PM
Thanks Woka, but how do I make the logins integrated?
Errr...care to explain??? :confused:
Woka
RobDog888
Mar 15th, 2005, 04:20 PM
I want to make it a login page to my compnay's network. So I figured I could make it like Outlook Web Access
where you login into the domain using your Windows domain\username and password.
Wokawidget
Mar 15th, 2005, 04:31 PM
I want to make it a login page to my compnay's network. So I figured I could make it like Outlook Web Access
where you login into the domain using your Windows domain\username and password.
Errrr...:confused:
Can you post a screen shot?
oka
RobDog888
Mar 15th, 2005, 04:48 PM
Boooo!
Wokawidget
Mar 15th, 2005, 05:11 PM
OK...Here's what I have got. Quick demo for you.
Attached to the zip is the aspx code for the page, the HTML.
Copy this into your page.
In the folder where your app is, copy the Resources folder from the zip.
Hope this helps.
Will add the options buttons now.
Woka
RobDog888
Mar 15th, 2005, 05:22 PM
No need for the option buttons. I just need to figure out how to authenticate the login with the
windows domain/username and password.
Wokawidget
Mar 15th, 2005, 05:38 PM
I have now created this:
Woka
RobDog888
Mar 15th, 2005, 05:46 PM
:lol: Copyright infringement! Here comes M$
Thanks for your help!
How can we get the passwrod textbox to display the password chars?
Ps, I am finally on msn :( Did you read my last pm?
Wokawidget
Mar 15th, 2005, 05:59 PM
Here's a link for nt authentication.
http://www.vbforums.com/showthread.php?t=322658&highlight=authenticate+nt+user
Haven't tested it, as I don't have a domian set up at the moment.
Woka
Wokawidget
Mar 15th, 2005, 06:01 PM
<asp:TextBox id="txtPassword" width="100%" runat="Server" TextMode="Password"></asp:TextBox>
Use the textmode property.
Woka
mendhak
Mar 15th, 2005, 06:23 PM
What on earth are you doing? Just set the allow anonymous access setting in IIS to false, and they'll be prompted for their windows username/password.
You can then work from there using System.Environment.Username.
Wokawidget
Mar 15th, 2005, 06:26 PM
Yes you can...
But it's not very "pretty" is it. A huge ugly popup message box...Hmmmm.
Bad Mendhak *slap*
I would MUCH MUCH prefer a decent login screen, similar to above, instead of the auto popup windows authentication message box.
Woka
mendhak
Mar 15th, 2005, 06:28 PM
I wouldn't. :)
Wokawidget
Mar 15th, 2005, 06:31 PM
Explain why...?
Is it due to security issues or anything of that nature, is it because you actual prefer the popup message box, or is it because you're too lazy to search for the code and create a nice login screen?
Woka
mendhak
Mar 15th, 2005, 06:37 PM
The login work's been done for me there. I don't need to put in some extra efforts just because it may look nicer. I can allow and deny certain users right from Windows itself instead of taking care of that in a say, DB/web.config.
RobDog888
Mar 15th, 2005, 06:42 PM
So there is no simple way to use a custom login screen and allow windows to do the authentication?
Wokawidget
Mar 15th, 2005, 06:53 PM
I can allow and deny certain users right from Windows itself instead of taking care of that in a say, DB/web.config.
Did you look at the code?
It validates the login against the domain server...so it does exactly what your windows login script does.
I think you have more control this way.
Woka
RobDog888
Mar 15th, 2005, 08:28 PM
I missed that link somehow :blush:
That code is exactly what I wanted to know! It is exactly the same as the default popup login window?
mendhak
Mar 15th, 2005, 08:28 PM
Did you look at the code?
It validates the login against the domain server...so it does exactly what your windows login script does.
I think you have more control this way.
Woka
Nope, didn't look at it. Assumed it was a login control like the screenshot. You can prefer your way, they're both apparently the same thing.
RobDog888
Mar 15th, 2005, 08:40 PM
Cool! I feel better using it now since I dont want to let just anybody into my domain!
Thanks Woka & FrogMan :thumb:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.