|
Here's an article that might help...
http://www.microsoft.com/windows2000/en/advanced/help/default.asp?url=/windows2000/en/advanced/help/moc04_57.htm
|
|
|
|
|
I started ASP.NET last night, and I put an ASP:Label in my page, and some normal text. The text is rendered so that it's written over the label. How do I mix asp controls and html so that each lines up with the other, or can't I ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
First question: Do you have it configured for Grid or Flow layout?
My first assumption is that the label control could be using placement coordinates whereas your normal text is not, therefore allowing for "overlapping".
|
|
|
|
|
I thought of that this morning - it's grid I believe ( the default ). Will changing it fix my problem ?
It's also all in a server run form if that makes any difference.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Are you trying to place the label control on the upper left portion of the page?
If you want the label and text to "flow" together then yes, I would recommend setting it up for flow...
Example:
Normal Text ASP Lable
---------- --------
User Name: MHeckman
|
|
|
|
|
I have made a homepage in ASP.NET. But it's damn slow! I don't know if it is the server or .NET (the CLR I guess if .NET)....
I have my homepage on DotNetPlayground.com
Do you know something why it's so slow... I hope it's the server and not the CLR in .NET!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
|
Can you tell me more?
How to use... ehm... it....
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
|
Uwe Keim wrote:
Hey, am I your personal trainer?!?
come un....
Uwe Keim wrote:
Oh, it only works integrated inside Visual Studio .NET, but I think the .NET Framework itself brings you some profiling methods?!?
Yes, so how ill I then get my ASP.NET homepage work faster on DotNetPlayground.com's server?
Or... does thiss tool optimize the code or something......
blaast...
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard,
I don't think it can be .NET. Everything I write in ASP.NET gets comments about how much faster than an ASP site it is (and so it should be). You have to realise that a free hosting service like DotNetPlayground is likely to be slow.
Check out http://www.santt.com[^] for a simple site I wrote for running a small (South America variant) Diplomacy tournament. (as you might guess from our previous conversation, this is hosted by Brinkster on their Premium servers)
The tournament is over now but this was dead handy for keeping people updated and the front page actually runs quite a lot of processing (to calculate team scores).
If this can run that fast using an Access database, I don't accept that ASP.NET is slow. It wasn't even written that efficiently (and in VB.NET too!); I've learned a lot since that was written.
Paul
|
|
|
|
|
Thank you!
These words was calming!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Message Removed
-- modified 25-Apr-24 12:42pm.
|
|
|
|
|
Message Removed
modified 25-Apr-24 12:42pm.
|
|
|
|
|
I create a simple website with ASP.NET.
In web.config,i define "forms" auth and user first login will direct to login.aspx,but once they login success,then the next time,they access to the website,they need not to have user/pass checked because of (I think) cookies.
So how can I check user/pass each time users browse my web?
And another question,if the user idles for some time say 30 minutes,how can I automatically log him out for security.
Thanks.
this is my signature for forums quoted from shog*9:
I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
|
|
|
|
|
zhoujun wrote:
In web.config,i define "forms" auth and user first login will direct to login.aspx,but once they login success,then the next time,they access to the website,they need not to have user/pass checked because of (I think) cookies.
So how can I check user/pass each time users browse my web?
If you create a permant cookie by calling
RedirectFromLoginPage("",true)
then this cookie will stay on the machine until you call SignOut() but if you specify false as the second parameter you application will only create a session cookie which should produce the behaviour you want.
zhoujun wrote:
And another question,if the user idles for some time say 30 minutes,how can I automatically log him out for security.
This again can't be done for permanent cookies. But session cookies can be timed out. The default value is 30 minutes of inactivity but you can specify otherwise in your web.config file:
< authentication mode="Forms">
<forms timeout="yourTimeInMinutes" />
< /authentication>
Cheers
HTH
Martin
"Situation normal - all fu***d up"
Illuminatus!
|
|
|
|
|
Thanks,Martin.
It works.
this is my signature for forums quoted from shog*9:
I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.
|
|
|
|
|
I have done simple forms authentication and have put the username and password in the Web.config file. I tried to type in the path to Web.config in my browser to see if I could download it, I could not!
But when I read ASP.NET Step by Step they say it IS possible to download that file...
So... is the passwords safe in the Web.config file?
I will move over to a database soon as I learn how to add/remove/update a database, store the pass/usr names in Web.config file is not good anyway...!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
It should be safe, since .CONFIG files are associated in IIS with "aspnet_isapi.dll" which does not allow donwloading them.
--
See me: www.magerquark.de
|
|
|
|
|
i want to pass some data to a textbox which is in a java class..can u tell me how to get the handle for the textbox...can u reply a bit faster...
|
|
|
|
|
Usually data is passed in the <PARAM ...> tags along with the <APPLET or <OBJECT tag.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hello all, this is my login script but Im having trouble sending it to the "action="checklogin.aspx" page. I used to use ASP 3.0 and I think the concept of this may have changed and I'm overlooking something very simple Can anyone help the 2 pages are below:
login.aspx....
--------------------------------------------------
<script language="c#" runat="server">
void Page_Load()
{
welcomeNote.Text = "<center><b>Please enter your Username and Password to login to the GDCLTD Admin System:</b></center>";
}
</script>
<html>
<head>
<title>GDCLTD ASP.NET BETA</title>
</head>
<body>
<asp:label id="welcomeNote" runat="server" />
<br / >
<center><br /><br /><a href="index.asp"><img src="images/earthlogo.jpeg" height="230" width="194" alt="Global Development Consultancy Limited logo"border="0"></a></center>
<br /><br /><p><center><a href="http://www.gdcltd.net">http://www.gdcltd.net</a></center></p>
<br />
<center>
<form action="checklogin.asp" method="post" id="frmLogin" runat="server">
<asp:Table id="loginTable" border="1" width="25%" runat="server">
<asp:TableRow>
<asp:TableCell>
<center>
<br />
<br />
Username: <asp:textbox id="username" runat="server" size="18" runat="server"/>
<br />
Password: <asp:textbox id="password" runat="server" size="18" runat="server" />
</center>
<br />
<br />
<center>
<input type="Submit" Value="Login">
<input type="RESET">
</center>
<br />
<br />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</form>
</center>
</body>
</html>
------------------------------------------------
checklogin.aspx
------------------------------------------------
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="c#" runat="server">
void Page_Load()
{
string strConnection = "Provider=Microsoft.Jet.OleDb.4.0;";
strConnection += @"Data Source=C:\gdcltdDotNet\gdcltd.mdb";
string strUsername = Request.Form["username"]; //get username from login.aspx
string strPassword = Request.Form["password"]; //get password from login.aspx
string strSQL = "SELECT * FROM tbl_users WHERE username = '" + strUsername + "';";
//try and make connection
try
{
OleDbConnection objConn = new OleDbConnection(strConnection);
OleDbCommand objCommand = new OleDbCommand(strSQL, objConn);
OleDbDataReader objReader = null;
objConn.Open(); //open connection to database
objReader = objCommand.ExecuteReader();
while (objReader.Read() == true)
{
if(objReader["username"].ToString() == strUsername)
{
if(objReader["password"].ToString() == strPassword) // username and password match
{
Response.Write("Details correct");
}
}
}
objReader.Close();
objConn.Close();
}
catch(Exception e)
{
Response.Write(e.Message); //write error message
}
}
</script>
<html>
<body>
</body>
</html>
-------------------------------------------------
If anyone knows how this could be done better or used in one page or something, can you let me know as I'm just starting out in asp.net
-- modified 19-Aug-21 21:01pm.
|
|
|
|
|
If anyone knows how this could be done better or used in one page or something, can you let me know as I'm just starting out in asp.net
Hi,
You could just have one page to serve the purpose. This 'postback' feature, is actually the beauty of ASP.NET (in my opinion)
Here is a sample code in VB.NET. Sorry I'm not familiar with C#, but you could adapt the code easily.
<script runat="server">
Sub Page_Load(obj as Object, e as EventArgs)
'Put any code to execute here during page load
End Sub
Sub btnLogin_Click(obj as Object, e as EventArgs)
'Retrieve username and password using these codes
Dim strUserName as String
Dim strPassword as String
strUserName = txtUserName.Text
strPassword = txtPassword.Text
'Put your authentication code here, eg. access database
End Sub
</script>
<html>
<head>
<title>Login Page</title>
</head>
<body>
<form runat="server">
<p>User name: <asp:TextBox id="txtUserName" runat="server" />
<p>Password: <asp:TextBox id="txtPassword" textmode="password" runat="server" />
<p><asp:Button id="btnLogin" text="Login" onClick="btnLogin_Click"
runat="server" />
</form>
</body>
</html>
Enrico
|
|
|
|
|
I can't find IsPostBack in your code?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I have I did that got it working thanks though I agree it is a good feature
-- modified 19-Aug-21 21:01pm.
|
|
|
|