|
jagadeeshkumar2106 wrote: iam using isdate function to check the whether the given date is correct or not but it is taking only if the date is given in mm/dd/yyyy format.how to check it shoukd take in dd/mm/yyyy format also
Create an instance of DateTimeFormatInfo class (System.Globalization) and specify the ShortDatePattern as 'dd/MM/yyyy' and then convert the string Date to the specified format using Date.Parse before checking it with IsDate() function.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
hi jon will u plz explain me some wat in brief
|
|
|
|
|
jagadeeshkumar2106 wrote: hi jon will u plz explain me some wat in brief
You need to write something like this to handle the dateformat when it is 'dd/MM/yyyy'.
Dim DateFormat As New DateTimeFormatInfo
DateFormat.ShortDatePattern = "dd/MM/yyyy"
If IsDate(Date.Parse(DateString, DateFormat)) Then
'your code
End If
I suggest you to write a common shared function which will take the string date in the format 'dd/MM/yyyy' and return the parsed Date. Then this function can be used whenever you need to do a Date conversion.
Return Date.Parse(DateString, DateFormat)
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
|
hi shalini
i have to set this before i use the isdate function?it check the date in dd/mm/yyyy format
|
|
|
|
|
hi all
i have problem with file
i move file but this file being used by another process.
How can i shutdow process used this file ??
|
|
|
|
|
in the window explorer , goto Tools---Folder Options---View---Uncheck the use simple file sharing recommended.
Do this for the folder which ocupies ur file
Hope this will help u.Otherwise let me know
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hi. I have a program that Shows DLL content.
Is there ant way to privent to show dll content, such as classes , methods and so on?
if every body can see my source code, how can I have a secure page? or how can I set a lisence for my program. I want to sell a web project only for a specific domain. how can I do it?
|
|
|
|
|
mohandesmehran wrote: Is there ant way to privent to show dll content, such as classes , methods and so on?
Not without obfuscating the code, there isn't any way.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
You keep asking this over and over. The answer is, if you want your page to be secure, you have to host it yourself.
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 )
|
|
|
|
|
Christian Graus wrote: You keep asking this over and over
Oh, he's one of those "I'll keep asking my question over and over until I get the clue" kind of people
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Looks that way. Plenty of those about, it seems.
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 )
|
|
|
|
|
mohandesmehran wrote: Hi. I have a program that Shows DLL content.
Check whether you have enabled "Directory Browsing" option. I believe, if you turn it "off", you will be all set.
|
|
|
|
|
ROTFL. Well, if he hosts it on his own server, perhaps.
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 )
|
|
|
|
|
how can I retrive User Ip Address in asp.net pages?
|
|
|
|
|
You won't be able to do so for a specific computer, you will get the router's ip only.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Try this,
Request.ServerVariables("REMOTE_HOST")
|
|
|
|
|
Response.Write(Request.UserHostName.ToString());
|
|
|
|
|
so thanks.
best regards.
mehran asghari
|
|
|
|
|
OK. So i'm dealing with the ASP.NET membership systems right now and i'm writing a page for activating a user based on the code and the username supplied in the query string.
What I need to do is check to see if the username supplied exists in the users table.
The only way I can think to do this, is get a collection of all the users in the database, and see if it's in the collection. 2 problems with that though:
* I don't know how to do that (yet)
* It will be really slow when the database gets bigger
Is there any other way to do it? And could somebody show me how to check if something is(or in this case isn't) in a collection using an if statement (I want to do "If value isn't in collection, do error page")?
Don't you just hate coming up with something to put here?
|
|
|
|
|
Bursh. wrote: It will be really slow when the database gets bigger
Not really at all. We do this kind of thing all the time without any ill-effects.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
aah right. Thanks for clearing that up for me. That was my (educated) assumption. So can anybody show me how to do this?
Don't you just hate coming up with something to put here?
|
|
|
|
|
I've done just the basic table with username/password.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I need to know how to check that the user exists! Not what tables you have.
Don't you just hate coming up with something to put here?
|
|
|
|
|
Bursh. wrote: Not what tables you have.
Huh? You have to have the users stored somewheres in a table. You query the username/password and if it returns with nothing, then user doesn't exist.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|