|
Michael Sync wrote: 2. Password should not be stored what the user entered.
For example, the user set the password "abc123". then, we append some checksum or something to the password. (e.g. "abc123" + "USR1092" ) then, we encrypt this text and save it in the database.
I mean, password with salt
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi ..Frd....once try this code...this is decryption..
private string Decrypt(string strText, string sDecrKey)
{
byte[] byKey;
byte[] IV = {18, 52, 86, 120, 144, 171, 205, 239};
byte[] inputByteArray;
// inputByteArray.Length = strText.Length;
try
{
byKey = System.Text.Encoding.UTF8.GetBytes(sDecrKey.Substring(0, 8));
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
inputByteArray = Convert.FromBase64String(strText);
MemoryStream ms = new MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(byKey, IV), CryptoStreamMode.Write);
cs.Write(inputByteArray, 0, inputByteArray.Length);
cs.FlushFinalBlock();
System.Text.Encoding encoding = System.Text.Encoding.UTF8;
return encoding.GetString(ms.ToArray());
}
catch (Exception ex)
{
return ex.Message;
}
}
Naik M
|
|
|
|
|
Hi
i want to get list of users of sharepoint and send to them an email.
do any body know about it?
|
|
|
|
|
Do you want to send an email to more than one user?
God is always with you.
|
|
|
|
|
yes. one or more than one. both of them. plz
|
|
|
|
|
Create a mailing list and add emails to that list.
message.To = txtEmail.text
and the server can take the rest of actions.
try this link for more details:
http://www.aspheute.com/english/20000918.asp
Let me know whether it is working for you.
God is always with you.
|
|
|
|
|
Hi Dear
I have 2 problem :
1- in getting list of sharepoint users?
2 sendeng email for them.
ur solution is just solve my secend problem but first i can get the list of sharepoint users.
thanks for ur help.
|
|
|
|
|
I have a requirement to read the view file, please help me out ?
How to access FoxPro .VUE (view file) using asp.net to read the data ?
Kind Regards,
Madhusudan Kushwaha
|
|
|
|
|
please don't double post.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
I have a requirement to read the view file, please help me out ?
How to access FoxPro .VUE (view file) using asp.net to read the data ?
Kind Regards,
Madhusudan Kushwaha
|
|
|
|
|
Hi,
I have page in which user will fill the data by clicking submit....once he click submit button it goes to the next page and I want when user wants to go back to previous the content of previous page must be clear and he get the message "Page expire".
Regards,
KBM
|
|
|
|
|
ASP.NET 1:
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1)
Response.CacheControl = "no-cache";
Response.Expires = -500;
ASP.NET 2:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1)); //or a date much earlier than current time
-----
|
|
|
|
|
I have a Master Page and would like to be able to allow each page pull meta tag keyword and description information from an SQL database. How would I add these to each page, pulling that information from an SQL table?
Matthew Hansel
|
|
|
|
|
A MasterPage still supports code-behind. Add a literal control to the master page and set the text as you would on any other data driven page.
only two letters away from being an asset
|
|
|
|
|
I am still new to this. Could you possibly post a sample piece of code to show how this is done? Thank you.
Matthew Hansel
|
|
|
|
|
<br />
<head runat="server"><br />
<asp:literal runat="server" id="meta"></asp:literal><br />
</head><br />
<br />
protected void SetMetaTag()<br />
{<br />
meta.Text = GetMetaTagsFromDb();<br />
}<br />
only two letters away from being an asset
|
|
|
|
|
My question is this:
I have been able to get a feedback form w/ Captcha working and redirecting to a page after successful completion; now I need to send the information gathered in the form to an email address. How can I get this to happen?
Thanks for your help!
----- feedback.aspx.cs -----
using System;
using System.Data;
using System.Configuration;
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 _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}
----- End of File -----
|
|
|
|
|
google?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes; but where do I put it in the file?
|
|
|
|
|
nickabradley wrote: where do I put it in the file?
Which file are you talking about?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Here is a copy of my feedback.aspx.cs file...
--- feedback.aspx.cs ---
using System;
using System.Data;
using System.Configuration;
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 _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}
--- End of File ---
I believe that the below bit of code will allow me to send the form info back to me in a email (I’m not sure), and I think it would go somewhere in the OnSuccess section of the feedback.aspx.cs file; I just don’t know how to format it to make it work. After they complete the form I need it to send the info back to me and then redirect them to a different page.
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(txtEmail.Text, txtName.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("winterbanquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = txtMessage.Text;
smtpClient.Send(message);
}
|
|
|
|
|
No idea about OnSuccess event or OnFailure event.. Where do you get those events??
SmtpClient smtpClient = new SmtpClient("YourSMTPServer");<br />
MailMessage message = new MailMessage();<br />
<br />
try<br />
{<br />
MailAddress fromAddress = new MailAddress(txtEmail.Text, txtName.Text);<br />
smtpClient.Host = "localhost";<br />
smtpClient.Port = 25;<br />
message.From = fromAddress;<br />
message.To.Add("nickbradley@talligewi62.org");<br />
message.Subject = "Talligewi 62 Website Feedback";<br />
message.Bcc.Add(new MailAddress("winterbanquet@talligewi62.org"));<br />
message.IsBodyHtml = false;<br />
message.Body = txtMessage.Text;<br />
smtpClient.Send(message);<br />
<br />
Response.Redirect("http://www.talligewi62.org");<br />
}<br />
catch(Exception ex){<br />
}<br />
You can redirect after sending the mail
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
OnSuccess event and OnFailure event were included in the example file that I’m using to try and make work.
Below is a copy of two of the files that are part of my feedback form:
Something’s wrong I just don’t know what…
Is there a way I can send you a zip file with every thing so maybe you can see what’s going on here?
--- feedback.aspx ---
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="feedback.aspx.cs" Inherits="_Default" %>
<%@ Register TagName="Captcha" TagPrefix="Controls" Src="~/Control/Captcha.ascx" %>
<!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>Burning Issues</title>
</head>
<body><form id="form1" runat="server">
<br />
<table width="100%" border="0" cellpadding="10">
<tr>
<td width="22%"><div align="right">
Name:</div></td>
<td width="78%">
<asp:TextBox ID="name" runat="server" Width="475px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="name"
ErrorMessage="Please enter your Name">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td><div align="right">Email Address: </div></td>
<td>
<asp:TextBox ID="email" runat="server" Width="475px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="email"
ErrorMessage="Please enter your Email address">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="email"
ErrorMessage="Please enter a valid Email address (Bob@example.com)" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator></td>
</tr>
<tr>
<td><div align="right">OA Lodge Name and Number:</div></td>
<td>
<asp:TextBox ID="lodge" runat="server" Width="475px"></asp:TextBox>
</td>
</tr>
<tr>
<td><div align="right">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Status"
ErrorMessage="Please Slect your Status">*</asp:RequiredFieldValidator>Membership Status:</div></td>
<td><p>
<asp:RadioButtonList ID="Status" runat="server">
<asp:ListItem>Non Member</asp:ListItem>
<asp:ListItem>Ordeal</asp:ListItem>
<asp:ListItem>Brotherhood</asp:ListItem>
<asp:ListItem>Vigil</asp:ListItem>
</asp:RadioButtonList></p>
</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<p>Please leave us any questions or comments that you may have. In order for us to be able to reply via e-mail be sure we have you e-mail address above and please keep you questions or comments to fewer than 1000 characters.<asp:RequiredFieldValidator
ID="RequiredFieldValidator4" runat="server" ControlToValidate="Remarks" ErrorMessage="Please keep your Comments to 1000 chars or less">*</asp:RequiredFieldValidator></p>
<p>
<asp:TextBox ID="Remarks" runat="server" Height="100px" MaxLength="1000" TextMode="MultiLine"
Width="750px"></asp:TextBox></p>
</div></td>
</tr>
</table>
<p> </p>
<Controls:Captcha ID="captcha" Message="Please enter text shown below:" runat="server"
OnSuccess="OnSuccess" OnFailure="OnFailure" BackgroundColor="#ffffff" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</form>
</body>
</html>
--- End of File ---
--- feedback.aspx.cs ---
using System;
using System.Data;
using System.Configuration;
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;
using System.Net.Mail;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
SmtpClient smtpClient = new SmtpClient("mail.talligewi62.org");
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(Email.Text, Name.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("winterbanquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = lodge.Text; remarks.Text; Status.Text;
smtpClient.Send(message);
Response.Redirect("http://www.talligewi62.org");
}
catch (Exception ex)
{
}
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}
--- End of File ---
|
|
|
|
|
Okay. I understand about the OnSuccess and OnFailure.
nickabradley wrote: message.Body = lodge.Text; remarks.Text; Status.Text;
What is this code?? You should set like that message.Body = lodge.Text + " " + remarks.Text + " " + Status.Text; ..
Except this line, your code should work fine. So, please change the code as I suggested. and try again.. Let us know the result... If you still have the problems after updating, show us the error message..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Server Error in '/feedback' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Email' does not exist in the current context
Source Error:
Line 23: try
Line 24: {
Line 25: MailAddress fromAddress = new MailAddress(Email.Text, Name.Text);
Line 26: smtpClient.Host = "localhost";
Line 27: smtpClient.Port = 25;
Source File: c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs Line: 25
Show Detailed Compiler Output:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_vylzudcx.dll" /R:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Code.civsghgv.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /out:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.dll" /debug- /optimize+ /win32res:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\ibwg1szs.res" /w:4 /nowarn:1659;1699 "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.0.cs" "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.1.cs" "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.2.cs"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(25,55): error CS0103: The name 'Email' does not exist in the current context
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(25,67): error CS0103: The name 'Name' does not exist in the current context
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(33,47): error CS0103: The name 'remarks' does not exist in the current context
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727
|
|
|
|