|
You can embed your images to the email.
Example:
Let say you want Image1.jpg to show in you email
Attached the Image1.jpg to you email and your img tag will look as follows:
<img src="cid:Image1.jpg" width="100" height="100" />
it is better to host your images than embedding it, last time I checked, gmail does not embed the images but it has been a while when I used this way, just test it in web mail clients.
|
|
|
|
|
Hi all
I have problem with respons.redirect()?????
I have wrote a website with Asp for authentication users,
in login.aspx file I have wrote a script code witch authenticate user.
I want to load another file after successfull login.
this is my code in login.aspx file:
btnLogin_Click(object sender AuthenticateEventArgs e)
{
Boolean blnresult;
blnresult = false;
blnresult = Authentication(Login1.UserName, Login1.Password);
if (blnresult == true)
{
Response.Redirect("~/Welcom.aspx",false);
Context.ApplicationInstance.CompleteRequest();
e.Authenticated = true;}
<asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
<asp:Login ID="Login1" runat="server" >
</asp:Login>
</asp:content>
but after login the Welcom page doesnt load!!!!
what do you think about this?
why it doesnt work?
|
|
|
|
|
If the redirection is to another script on the same server, use Server.Transfer instead.
The code lines following the redirect/transfer don't get executed. Swap around.
Your comment // This is the actual statement which will authenticate the user, is in the wrong place
the line
blnresult = Authentication(Login1.UserName, Login1.Password) does the authentication, and is very likely that function is where your problem is.
Use Response.Write to find out what blnresult state is after Authentication.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
modified 10-Apr-13 11:04am.
|
|
|
|
|
thank you so much
I think that you are right;
I undrestood that the problem is in another file in my "add new user.aspx" file,in that I add a new user into my table but I think it doesnt work correctly,it doesnt add any row to my table,I dont know why?
this is my code in "add new user" file:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection();
string connectionstr=@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\EHSAN\Documents\Visual Studio 2010\Projects\The Club\The Club\App_Data\Database1.mdf;Integrated Security=True;User Instance=True";
con.ConnectionString=connectionstr;
string sqlstring;
sqlstring ="insert into Authenticate (username,password)VALUES ("+ CreateUserWizard1.UserName+","+CreateUserWizard1.Password+")";
System.Data.SqlClient.SqlCommand objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con);
Response.Redirect("~/Login.aspx");
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="server">
<asp:CreateUserWizard ID="CreateUserWizard1" Runat="server"
oncreateduser="CreateUserWizard1_CreatedUser">
</asp:CreateUserWizard>
</asp:Content>
plz help me!
thank you...
|
|
|
|
|
You seem to be confusing the table name (Authenticate) in the database as a function. You need to create a function that will query the database for name and password, returning true/false. (your previous code is expecting a True/False reply from a function named Authenticate)
First, test your redirection works, by creating an empty Authenticate function, returning True. Then you can move on and tackle the database/authentication stuff. Probably best if you post in the database forum for SQL related help.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
hi
when I was studying mvc architecture, i knew that when the model is updated, all Views(such all open form or view) are informed and given a chance to update themselves(it's a feature of mvc architecture).how can i do this in asp mvc 3 without ajax?
|
|
|
|
|
Hi,
I have asp.net website, and have email functionality implemented for forget password and some other module.
Email works fine, but some time it bouncing back to sender address.
I have spent 2 days for this and still not get solution.
Following notification (Delivery status Notification) i get at me sender address with email,
1. Final-Recipient: xxxxxxxxxxx
Action: failed
Status: 5.5.2
Diagnostic-Code: smtp;504 5.5.2 <xxxxxx>: Helo command rejected: need fully-qualified hostname
2. Final-Recipient: xxxxxxxx
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)
IN FQDN I write server computer Name.
Thanks in advance.
|
|
|
|
|
AbidHussain128 wrote:
IN FQDN I write server computer Name.
What did you write: myserver or myserver.mydomain.com ? It must be the last style.
|
|
|
|
|
it is written "Server Computer Name"
(Right click on My Computer > Full name of computer)
|
|
|
|
|
Hi, I am using vbscript.
vbscript is working on windows xp.
but not windows 2003.
what should i do?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
|
Yes it is installed, and required for Product Activation (OOBE) among other things.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
What error(s) are you getting? (if any)
post the vbscript code so that somebody can better understand the problem.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
I have a treeview control that gets populated at runtime with a pyramid of employee names. I put the css scrollbar on the view by putting overflow:auto" in the tag where the treeview is located. The users are now asking me to to have the scrollbar go down in the treeview where a treeview item is selected.
How do I make a scroll bar to go to a place where the treeview has been selected?
Note: treeView1.SelectedNode.EnsureVisible();
is not available in asp.net need another way.
Got some links in stackOverflow but no use.!!
|
|
|
|
|
|
I have table with using jquery that contains paging. I met the problem when implement the paging, I click the button Edit (inside table on its row) - but the popup doesn't not show. Please give me some advice for solution...
|
|
|
|
|
Hi,
I am using the following code to encrypt password with salt. I want to know can I decrypt so I can verify if the password is correct or it knowing that I am storing the passwords in MySQL,.
public enum HashMethods
{
SHA512
}
private static string HashSHA512Managed(string saltedPassword)
{
UnicodeEncoding uniEncode = new UnicodeEncoding();
SHA512Managed sha = new SHA512Managed();
byte[] bytePassword = uniEncode.GetBytes(saltedPassword);
byte[] hash = sha.ComputeHash(bytePassword);
return Convert.ToBase64String(hash);
}
public static string EncryptPassword(string password, string passwordSalt, HashMethods method)
{
string siteWideSalt = Guid.NewGuid().ToString();
string encryptedPassword;
switch (method)
{
case HashMethods.SHA512:
encryptedPassword = HashSHA512Managed(siteWideSalt + password + passwordSalt);
break;
default:
encryptedPassword = HashSHA512Managed(siteWideSalt + password + passwordSalt);
break;
}
return encryptedPassword;
}
Technology News @ www.JassimRahma.com
|
|
|
|
|
You're not encrypting the password; you're generating a one-way hash. You cannot decrypt it.
You'll need to store the salt in the database against the user's record. When you need to verify the password, you retrieve the salt and the hashed password. You combine the entered password with the stored salt, generate the hash, and compare it to the hashed password.
http://stackoverflow.com/questions/326699/difference-between-hashing-a-password-and-encrypting-it[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Perfect answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
I have a form with many dropdowns and text boxes and a file upload.
I want to display the file path as soon as it uploaded without refreshing the entire form.
I am able to upload the file but the file path doesnot get displayed in the label.
however after refreshing the entire page i get the file path displayed in the label
Please help me
|
|
|
|
|
I suppose that you upload your images to "~/Content/images".
The following script may work for you. Pay attention to the attribute "src".
src="@Url.Content("~/content/images/")@item.ImgFileName"/>
You may find more for razor and mvc3 in my article.
http://www.codeproject.com/Articles/565513/How-to-series-about-MVC-jQuery-JSON-paging-mapRout
|
|
|
|
|
Hi,
I have the following url:
www.mydomain.com/signin
that's without .aspx becauzse I am using route mapping like this:
routes.MapPageRoute("volow_signup", "Signup", "~/Signup.aspx");
but sometimes I want to let the redirected to another page other than the member home and I wanted to add this in the url then when the user signed ijn I will redirect him to that page.
How can I do this?
Technology News @ www.JassimRahma.com
|
|
|
|
|
You can pass it as parameter in your querystring like,
www.mydomain.com/signin/newpage=testpage
hope this help you. let me know for your any query.
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
I am getting:
A potentially dangerous Request.Path value was detected from the client (:).
Technology News @ www.JassimRahma.com
|
|
|
|