|
Hi,
I have one field in which user will fill date for that I have taken One DropDown for "MONTHs" and One TextBox for "DATE" and another TextBox for "YEAR" ("Month/dd/Year"). Now I want to validate Date filled by user..that must be current date or just within 15 days back date.
I tried to validate date through range validator(jDateValid) and for that I have written :
int curr = DateTime.Now.Day;
JDateValid.MinimumValue = Convert.ToString(curr-15);
JDateValid.MaximumValue = Convert.ToString(curr);
but when the date is 1,2,3,4.....15 range validator giving error message.
Anybody help to solve this problem....
KBM
|
|
|
|
|
Hi,
on submit button you can check like this.
if(DateTime.Parse("Date in string format MM/dd/yyyy") >= DateTime.Now.AddDays(-15) && DateTime.Parse("Date in string format MM/dd/yyyy") <= DateTime.Now)<br />
{<br />
Label2.Text = "Right";<br />
}<br />
else<br />
{<br />
Label2.Text = "Wrong";<br />
}
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Thanks Rays,
It is working .....now i am trying to show the error message when condition is false.
Thanks again,
KBM
|
|
|
|
|
Hello every one ! How can I display node of parent node and corresponding child nodes.Suppose I have to display 'Label' nodes of all <ScreenToSupport>. There can be multiple <ScreenToSupport>
inside parent node <ScreensToSupport>.In this case I have to display Label 'rediffHomePage' and 'rediffHomePage1' of both <ScreenToSupport> node.But I have to display corresponding Label of FieldsToSupport/FieldToSupport' of <ScreenToSupport>..In this case I have to display Label 'HotJobs'and 'Game' for 'rediffHomePage'
similarly display Label 'Images' and 'Air Tickets' for rediffHomePage1'.
For example on click an Item like rediffHomePage from a repeater/dataList It should display Label like 'HotJobs' and 'Game'of FieldToSupport. How can I display Label of corresponding
FieldsToSupport/FieldToSupport on click on corresponding Label of <ScreenToSupport>..How can I do this ?
following is the structure of XML file, which is not follows an hierarchical structure of XML..
--------------------------------------------------------------------
<ScreensToSupport>
<ScreenToSupport>
<ScreenUniqueId>199d1dfd-63ca-4271-b234-77da0f579e0e</ScreenUniqueId>
<SupportItems>
<ScreenSupportItem>
...
<RefId>1</RefId>
</ScreenSupportItem>
</SupportItems>
<FieldsToSupport>
<FieldToSupport>
...
<Label>HotJobs</Label>
...
<FieldSupportItems />
</FieldToSupport>
<FieldToSupport>
...
<Label>Game</Label>
...
<FieldSupportItems />
</FieldToSupport>
</FieldsToSupport>
<Label>rediffHomePage</Label>
</ScreenToSupport>
<ScreenToSupport>
<ScreenUniqueId>e62abc49-efc7-4a5d-908f-33f2f4df070b</ScreenUniqueId>
<SupportItems>
<ScreenSupportItem>
...
<RefId>2</RefId>
</ScreenSupportItem>
</SupportItems>
<FieldsToSupport>
<FieldToSupport>
..
<Label>Images</Label>
..
<FieldSupportItems />
</FieldToSupport>
<FieldToSupport>
...
<Label>Air Tickets</Label>
...
<FieldSupportItems />
</FieldToSupport>
</FieldsToSupport>
<Label>rediffHomePage1</Label>
</ScreenToSupport>
</ScreensToSupport>
--------------------------------------------------------------------
I am not very familiar with how displaying XML contents.. I tried this way..
But stuck on that point please help me ..
I will very thankful for that..
|
|
|
|
|
Hi,
Please post this article in Xml forum.
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
Hi
I want create a task and can email to users list . I mean I have a list of users and I want to email them how can I email in share point?
|
|
|
|
|
Look at the System.Net.Mail.SmtpClient class.
To send to all the users just use a loop.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Do you know how can i get list of users that are in sharepoint?
|
|
|
|
|
Hi
I want to fill 10000 records into a DropDown List.Which approach will give better performance either Fill by "Dataset" or Add item by "DataReader".
Ranjeet Singh
|
|
|
|
|
Filling itself will be better using DataReader
But what about load time of the page (a lot of data transfer to the client)
and what about the usability of the page? should the user search for the required entry within 10000 items?
I think you should make a change to the design. for example you can categorize items, or make them searchable.
|
|
|
|
|
any one help me to store and display hindi font in asp.net
|
|
|
|
|
ASP.NET is not for storing the data. If you want to store the hindi text in SQL, you can change the collation of your SQL database and store the hindi text as unicode characters..
then, read those strings from database and show it in your ASP.NET page as usual.. sometimes, you might need to specify the font name in CSS for your page..
I would like to suggest you to read some articles about localization in ASP.NET.
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,
this is hameed can any one pls tell me how we can convert aspx page into word and pdf.This aspx page consists of text boxes when we export this page to word or pdf the data in the table cell is rearranged.
so pls help me in sorting out this problem.
Hello sir
|
|
|
|
|
hi
i want to use text file as my data storage.i be able to insert & retrive from text file ..but how to update and delete prticulare line in text file?
Jintal Patel
|
|
|
|
|
|
how can i validate asp.net controls which is placed in ContentPlaceHolder of the masterpage?
Error showing whin i use "ctl00_ContentPlaceHolder1_MyControl"
Thanks
Yesu
|
|
|
|
|
ypki wrote: Error showing whin i use "ctl00_ContentPlaceHolder1_MyControl"
How are you trying to use the id and what error message do you get?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Hey Guys
Please suggest me some control/ App for importing contacts from MSN, Yahoo etc. When someOne write his username and password.
Thanks for your time
|
|
|
|
|
Please check this post[^]
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."
|
|
|
|
|
hey any one help me desing database driven hindi website in asp.net
|
|
|
|
|
I already answered your question here.
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."
|
|
|
|
|
Hello everyone,
I was looking for an API to use on my website to decode the logfile and store data in my database. But it seems there anything available...
If anybody get any samples or any c# code snippet dealing with logfiles, I'll appeciate and it will be helpfull...
thanks.
Just Relax And Keep It Simple.
|
|
|
|
|
Mack Ait-Aoudia wrote: looking for google Analytics API
Mack Ait-Aoudia wrote: to decode the logfile and store data in my database
You mean, tracking the stats of your website??
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."
|
|
|
|
|
hello Michael,
It's exactly what I mean and I'd like avoid the third party tools. I find many on the net but I get some specifics needs to reach and I want to develop something to extract the information from logfiles and save it in a database.
If you get any idea or any code snippet, I'll be great!
thanks.
Just Relax And Keep It Simple.
|
|
|
|
|
Sorry. man.. I was thinking to suggest you to try some thrid party tools (e.g. statscounter or reinvigorate)... If you don't want to use any third-party tool then it's okay.. For me, I don't like to develop something that is already available on the net..
you are thinking to read the weblog of your host?? I think that the format of log file might be differ from one host to another..
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."
|
|
|
|