|
HI All,
I want to display day like Tuesday , Friday , Sunday etc etc. I use the following response.write(date.now.day)...........But instead of day date is displayed......Please help me.....
I m using VB.NET..........
Thanks in advance..........
|
|
|
|
|
try putting it in a label as follows:
Label1.Text = DateTime.Now.Day.ToString();
maybe this instead:
DateTime dtday = DateTime.Now;
dtday.DayOfWeek
|
|
|
|
|
I have tried that too..........But failed..........I dont know whts wrong with that......
|
|
|
|
|
How it got failed could you be more specific ?
Why are you trying Response.Write function ?
Let me know what are you trying to do ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
check this
DateTime.Today.DayOfWeek.ToString()
Will return day of the week
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
dam you just beat me to it!
see edited posted above
|
|
|
|
|
Actually I m sending Email.....But first I store all info in string "emailBody", then at last I send Email and assing that variable to Emailbody........
|
|
|
|
|
Can you post some sample code so we can try and replicate the error
|
|
|
|
|
OOPS went for lunch
When i clicked reply to this question,that time No replies were there.
At my end the internet is very slow,so in mean time you replied.
It always happened if you didn't refresh CP page,
CP should automatically get refresh after certain time interval to avoid similar replies. What you say ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
dim emailbody as string.
emailbody = "some text"
emailbody &= date.now.day
Dim mailObj As New Mail.MailMessage
mailObj.To = "myID@domain.com"
mailObj.From = "admin@domain.com"
mailObj.Subject = "Testing"
mailObj.Body = emailBody
mailObj.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailObj)
|
|
|
|
|
try this use DateTime.Today.DayOfWeek.ToString(); instead what you have been using. Suggesting to use StringBuilder instead of string
Don't know about other things which are correct or not
Again if get any problem why the mail is not getting send then please have a look in google
dim emailbody as string.
emailbody = "some text"
emailbody &= DateTime.Today.DayOfWeek.ToString();
Dim mailObj As New Mail.MailMessage
mailObj.To = "myID@domain.com"
mailObj.From = "admin@domain.com"
mailObj.Subject = "Testing"
mailObj.Body = emailBody
mailObj.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailObj)
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks Sandeep Brother....... My problem solved with the following..........
DateTime.Today.DayOfWeek.ToString();
I realy appriciate u people........ Thanks for helping.....
|
|
|
|
|
Why post the above code with
coolmindd wrote: emailbody &= date.now.day
we had already given you an example of how to get it to work with the new code
|
|
|
|
|
how to display images on gridview according to value that we stored in database...i am using c#,asp.net2005...reply soon wit codes
|
|
|
|
|
No one is here working for you
So you want all things done so that you will just copy pate the code.
It is not going to help you anyway.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
you got my 5...
I Love T-SQL
|
|
|
|
|
I don't understand why people don't use google
This problem could easily be found by searching the web for some helpful code yet they post here wanting the ready made code
|
|
|
|
|
hai friend
i tried out in google...but i did't get dat...can u send me links...
|
|
|
|
|
http://www.google.co.uk/search?hl=en&q=asp.net+gridview&btnG=Google+Search&meta=
|
|
|
|
|
check this[^] out
I Love T-SQL
|
|
|
|
|
Yeah, I agree with you,google offer much for everything but the point is to know how to use it...
I Love T-SQL
|
|
|
|
|
Hi,
How can I get a string from a resource file in Javascript? am getting string from resource file in apsx page using
]]>;
Like this is there any function to get string from Resource file in Javascript?
Can any one help me?
Thanks
|
|
|
|
|
create a function that will return string from a function
like this
function Try()
{
var str='Somthing special over the years ';
return str;
}
and assign this function were you want to show that string
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi I tried that but that is not working. Actually my problem is, am using curomvalidator to validate radio buttons. In customvalidator am displaying ErrorMessage="Credit value must be selected". but I wanted to display that message dynamically.i.e depends on country it should display in that language. for that I have created resource files... I used ResourceManager.GetString("Credit"). How Can I assing this value to ErrorMessage in apsx page..?
<asp:CustomValidator id="vld1PaymentType" ClientValidationFunction="ValidateRadiobutton" runat="server"
ErrorMessage="Credit value must be selected" Display="none" Enabled="false"> </asp:CustomValidator>
I tried with the below line, but its not working.
ErrirMessage = <%=resourceManager.GetString("Credit") %>
Can you help in this one?
Thanks
|
|
|
|
|
It depends on How your custom validator is rendering the error message
Don't assign any error message at serever side e.g ErrorMessage=""
and first get you control by docuement get element by Id and then assign its value
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|