|
I have the Login Control on my login page. I implemented my own authenticate method so that it fires up a stored procedure in the DB to check the password. But when i punch in the correct password, it says my password is not correct. In my authenticate method, i simply output "user logged in" on a label. How do i make it so that the control itself reconizes that the login is sucessfull?
|
|
|
|
|
In your handler for the Authenticate event, make sure to set the .Authenticated property of the passed-in AuthenticateEventArgs argument to true if the user is successfully authenticated and false if not.
This example will authenticate a user named "bill" with password "evans" successfully; any other combination will be unsuccessful.
void OnAuthenticate(object sender, AuthenticateEventArgs e)
{
if (Login1.UserName == "bill" && Login1.Password == "evans")
e.Authenticated = true;
else
e.Authenticated = false;
}
|
|
|
|
|
I use AJAX in ASP.NET, in the client side code, I want to let user input data ( name, age, sex, address,...) and fill data into datagrid ( datalist ). How can i do it with javascript.
Thanks a lot !
|
|
|
|
|
I am creating a login sreen for my application. The usernames and passwords are stored in a mySQL database. the passwords are encrypted by the AES alogorithm (using AES_ENCRYPT(str,key_str) function in mySQL).
Whats the best way to check if the passwords are right?
Should i throw LoginControl.Password to a SQL statement and tell it to encrpt it to see if it matches the password in the database?
OR
Should I decrypt the password from the database, and then match it in my C# code?
OR
Should I encrypt LoginControl.Password using some AES algorithm method(maybe defined in the .net framework?) and then match it with the encrupted pass from database?
OR is there any other secure way?
thx thx for advice
|
|
|
|
|
|
The following is the error i keep getting:
-------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'upload'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="upload.aspx.cs" Inherits="upload" %>
Line 2:
Line 3:
Source File: d:\webs\omixad\upload.aspx Line: 1
---------------------------------------------------------
I have a simple upload.aspx file that has a fileupload object on it and actually uploads files to the server.
----------------------------------------------------------------------------------------------
<code><%@ Page Language="C#" AutoEventWireup="true" CodeFile="upload.aspx.cs" Inherits="upload" %>
<script>
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label" Width="255px"></asp:Label><br />
<asp:FileUpload ID="FileUpload1" runat="server" /><br />
<asp:Button id="UploadBtn" Text="Upload File" OnClick="UploadBtn_Click" runat="server" Width="105px" />
<br />
<span style="font-family: Tahoma"><span style="color: #0000ff"></span></span>
</div>
</form>
</body>
</html></code>
-------------------------------------------------------------------------------------------
The code behind file is upload.aspx.cs
-----------------------------------------------------------------------
<code>using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class upload : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void UploadBtn_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
//FileUpload1.SaveAs(@"C:\temp\" + FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath(@"temp") + FileUpload1.FileName);
Label1.Text = "File Uploaded: " + Server.MapPath(@"temp\") + FileUpload1.FileName;
}
else
{
Label1.Text = "No File Uploaded.";
}
}
}</code>
---------------------------------------------------------------------
I have IIS running on my local machine. When i run this on my local machine everything works beautiful. When i upload the files to a remote webserver (earthlink web hosting) I receive the error at the top.
Now i have been reading around and googleing and everything else and others have said that i need to build the application. I have built the application by clicking build / build page (website)
Then upload the two files back up to the web server but nothing changes same errors.
Then i read something about refrences and .dll files located in a bin folder but i cannot locate these files at all nor the bin folder.
If i need to get the bin folder on the remote web server where do i find it also where do i find the .dll file after a build.
<b>Someone please give me step by step instructions of what i need to do </b>to get this to work on the remote web server. Again it works on my local machine but not when i upload it to the remote server.
Thanks in advance
|
|
|
|
|
The bin folder is located in the root folder of the application, e.g. /bin. If the root folder is at d:\webs\omixad then the bin folder is d:\webs\omixad\bin.
Upload the dll files from the folder to a bin folder on the server located in the web root.
---
b { font-weight: normal; }
|
|
|
|
|
again...
there is no folder called bin in root folder of the application.
I do not have a folder called bin and there are no .dll files.
Someone help!
|
|
|
|
|
Hi there,
In fact, with the ASP.NET 2.0 you can deploy your web pages with the source code .cs without having to compile it to the assembly and put it in the bin folder. In this case, i would double check if the ASP.NET version 2.0 is used with the application on the remote server.
|
|
|
|
|
It is not used the vendor is still using asp.net 1.0.
How do i get this to work with asp.net 1.0
thanks
|
|
|
|
|
I was initially looking for and all in one package that would allow users to create a resume via a web interface and have user authentication to be able to edit it. And save to SQL.
Does anyone have any samples, or a good vendor that has this product to purchase that will run under IIS? I have searched up and down and would preffer someting simple and
Mike Dibble
|
|
|
|
|
Hi Mike. I don't have a reference for you, but it sounds like a straight-forward kind of application to build. You could use the Membership API to support user authentication easily enough, develop a form that includes text boxes you want for resume input... there are lots of ADO.NET examples out there for storing data in a SQL-compliant database... if you start to build it and run into some specific problems, post the issues.
|
|
|
|
|
Hey guys and girls. It's been awhile since I have done any asp.net programming and today while trying to remember how to keep my position on the page after a postback I ran across some articles about SmartNavigation that made me reconsider using it. I'm sure several here know what I'm referring to so my question is how do you get around it so that you can keep your scroll position on the page in at least IE and Firefox?
I saw this article today Hold Your (Scroll) Position[^]. Is anyone using this technique?
Thanks for the info,
Richard
|
|
|
|
|
Hi there. In 2.0 you can use the MaintainScrollPositionOnPostBack attribute of the @Page declaration:
<%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>
|
|
|
|
|
I have a web form with a datagrid. One column is select column, another column is privilege column. I add code in ItemDataBound event. Show privilege column only the user has privilege. Otherwise the text in grid cell will be "". Basically hide the cell. but however, when I click select column to show other form, when I come back from that form, then I notice the privilege column changed. All cells in the column show privilege. I step into the code, I found out the ItemDataBound event didn't get fired when the form postback. The grid get a kind of rebind. How can I prevent it happen?
Christine
|
|
|
|
|
Hi there,
The ItemDataBound event only gets fired when you call the DataBind method. If you want this event to raise on postback, you need to call the DataBind method again, but remember to set the EnableViewState property to false in order for the post back events to run properly. Another option is to use the ItemCreated event instead which always occurs when the page is visited.
|
|
|
|
|
Hi,
Do you know ColdFusion of Macromedia? I want to write a program that do some things like ColdFusion ( config IIS by command line ). If you have any idea, give me plz!
Thanks,
Hung
|
|
|
|
|
You do know this is an ASP.NET forum, right?
|
|
|
|
|
, ,,,, this is as ASP.NET forum, Not macromedia, please go away
Moh. A. Shafei
Think deeply be4 write 1 line of code
|
|
|
|
|
Hi,
this is my first post to the forum,and i hope i will be recieved well,
I am having an application in which i should be integrating the newsletter management system.The user will be sending the news letter to the visitors.
I dont know how to start,
can anyone help me in this regard...
thanks
Navinkumar
|
|
|
|
|
Hi Navin
I guess you know the requirements best !
So create it accordngly
If you just want a simple newsletter function..I suggest ...
1) create a webpage
2) for newsletter body, place a HTML editor in the page (e.g. fckeditor see fckeditor.net)
3) add controls/textboxes for collecting from, to, and subject fields
and do the programming ...
Hope this Helps
Arvind
|
|
|
|
|
Hi Aravind,
thanks for your reply.
I have few doubts in getting forward for this application.
1.Is this fckeditor is free and doesnot need liscense in future.because if we are going to insert a third part tool it should not effect the application of the client in future.
2.How to implement the feature of unsubscribing in the application.
I am relatively new to this concept.Help me!
Thanks once again as no one answered for nearly 20 hours.!!!
Navinkumar
|
|
|
|
|
We did a project a while ago using VB6 to create a desktop app for manipulating Powerpoint presentations (a bit like Powerpoint in that respect! )
Anyway, we need to do another one but the format of it would be most suited to a web app that people can connect to via a company intranet. The problem with that is that MS advise that you shouldn't run Powerpoint in a client-server environment, and having used it like that i'd have to agree.
So, my question is: does anyone know of any 3rd party apps that are suitable for running on a web server and that can provide functionality for changing Powerpoint presentations?
Any help would be very much appreciated!
|
|
|
|
|
|
Cheers mate! i'll check that out.
|
|
|
|