|
hi all,
here iam pasting some code....
message.Body = "Don't reply to this mail, it is automatically generated mail.Your new login password is " + newPassword ;
in the above code i used to send mail to the user a new password.
but the thing is i want to display the newpassword in BOLD characters, in user's mail
|
|
|
|
|
If you send it in html format, you can include standard HTML formatting tags.
|
|
|
|
|
No i am doing all this stuff in ASP.Net with C#
|
|
|
|
|
Yes, there is an option to specify the format of your mail, then you can include lovely text like:
.body = "<b>bold text</b>"
|
|
|
|
|
i want to make only newPassword into BOLD,
its(newPassword) a variable....
|
|
|
|
|
No offence to you, but this isn't exactly rocket science:
message.Body = "Don't reply to this mail, it is automatically generated mail.Your new login password is <b>" + newPassword + "</b>";
Don't forget to set your mail format to be HTML.
|
|
|
|
|
Thanks,
i got it...
|
|
|
|
|
bhattiprolu wrote: No i am doing all this stuff in ASP.Net with C#
Yes you are, But browsers, and email see only html tags. So when you think any kind of formating. You coud do in aspx, but since email isn't server side, you can only use HTML or plain text
|
|
|
|
|
I get the above exception on the following statement:
usrStatus=Convert.ToChar(dr["User_Status"]);
The db I'm using is MySQL. Currently the user status field is set to accept nulls. I changed to not null, but then I would get an error that says that the value is one character too long.
Any ideas how I can resolve this? thanks in advance.
|
|
|
|
|
It's because User_Status in that row is null and you can't convert nulls to other types.
What value is too long and what do you have the char set to (e.g. char(1))?
|
|
|
|
|
The field is varchar(1). When I set it to not null in the mysql db and then I try to read a char value into that field with the convert.tochar function I get this error: String must be exactly one character long
|
|
|
|
|
What kind of variable is usrStatus?
|
|
|
|
|
try putting the value in a string
<br />
string userStatus = dr["User_Status"].ToString();<br />
|
|
|
|
|
User Status in the database is a char(1). When I change it to not accept nulls I get the message that the value is too long. I am assuming that somehow MySQL sees a character in the field although there is none until I read it in with the data reader.
For now, I had to change the field in the database to a string and am reading it in as a string. Now I don't have any problems. But this solution is not ideal as I just want one character in that field. There is destined to be a user who will put more than one character in that field and right now the program allows them to.
|
|
|
|
|
Hi Everyone,
Just few minutes back i got cleared about the method DataBinder.Eval() method. But when i went through a code i came across a method Eval(string,string).
i can understand that this method is not the DataBinder.Eval(). It was used like <%#Eval("Name","~/UploadImages/") to the ImageURL property of asp:Image control.
Can anyone explain me about this method???
Thanks,
Srikanth
|
|
|
|
|
In ASP.NET 2.0, the DataBinder object that exposes the Eval() method is the default context for data binding expressions. You no longer have to explicitly refer to the object you want to evaluate.
This means that Eval() now has a much simpler syntax.
Paul
|
|
|
|
|
hai
i am an asp programmer.
i have two combo boxes optone and opttwo.
i have loaded values for optone from database
selected
<%
sqlPRO = "Select field1 From tablename"
set rs= conn.Execute(sqlPRO)
i=1
do while Not rs.EOF
%>
<%=rs("field1")%>
<%
i=i+1
rs.MoveNext
loop
rs.Close
%>
now i want to load a value for the second combobox opttwo
it's dependant on the first combobox optone
function setOptions(chosen)
{
var selbox = document.frm.opttwo;
selbox.options.length = 0;
selbox.options[selbox.options.length] = new Option('Select','oneone');
<%
strSQLQry = "Select field1 From tablename where ID='" & chosen & "'"
rs.Open strSQLQry, conn
rs.MoveFirst
While Not rs.EOF
%>
valFromList = "<%=rs("field1")%>";
selbox.options[selbox.options.length] = new Option(valFromList,'oneone');
<%
rs.MoveNext
Wend
rs.Close
%>
}
this code shows an error.i can't get the javascript variable into asp.
if anyone known please help me
Thanks and Regards
Ganesh Mohan
|
|
|
|
|
The problem is that the code is not at all executed in the order that you think it is. All ASP code is executed on the server, then the page is sent to the browser, and the client code is executed.
The ASP code that you have put inside your javascript function is always executed when the page is created, not when the javascript function runs.
To run server code that uses values from the client code, you have to send another request to the server and send the values along in the request. You can send values either in querystring or in form data.
To populate a second select box depending on the first, you can either reload the page to do the request to the server, or do the request behind the scenes using techniques like AJAX.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai
thanks for the reply.
Is it possible using hidden field?
|
|
|
|
|
ganeshMohan wrote: Is it possible using hidden field?
Yes.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai
please give me a example code?
|
|
|
|
|
Hi all,
I am having static data and this data is displayed in html table using Javascript. Now I want to show the database values using same logic, problem is that how to bind that data to html table and how do I assign values to javascript file which I have included in my aspx page.
Any suggestions??
Thanks in advance...
|
|
|
|
|
can anyone tell me what are the differences between setup project and
setup wizard.........?
Thanks in advance,
pavan...
|
|
|
|
|
None - I've never seen a setup program that's not a wizard.
You don't setup an ASP.NET site typically, so why did you ask that here ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have a textbox in the main page and a image control. Onclicking on the image one popup window is opening where there is a calendar control. On double clicking on the date it should come in the textbox of the main page.
How can i do that.
Thanks & Regards
Mishra
|
|
|
|