|
Thanks for ur reply sir...
But i dont understand ur answer.
So can u give me solution for that problem?
|
|
|
|
|
you have a string, and you want to change it's format, so you need to take the string and reorganise it. use the split method to split based on the / then reorder the three items you get back, to get the format you want. Or just use int.tryparse to get the ints and build a date time from there, if that is what you need.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Thanks for ur reply and i got the answer sir
|
|
|
|
|
Great - glad to help.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
|
Sorry for that previous post,was only a partial answer. Here is the complete answer
string input = "31/12/2005";
DateTime dt = DateTime.ParseExact(input, "dd/MM/yyyy", System.Globalization.CultureInfo.GetCultureInfo("en-US").DateTimeFormat);
string output = dt.ToString("MMddyyyy");
regards,
Gidon
|
|
|
|
|
Hi,
I have a login page which takes the username and password and connects to the Oracle database. The login details are same as oracle db login details. If the user attempts 5 invalid logins to the application, the user id gets locked in both the application and the database. However, if the user is typing the same wrong invalid password consecutively for 5 times, the user id is not getting locked in the database. This means for the same set of userid and password, the post back is not working. Can you please explain and give a solution? We are using ASP.NET 1.0 with VB.NET. Thanks in advance!
Regards,
|
|
|
|
|
why would it ? I mean, it's still one attempt,right ?
I guess this means some component is doing this, it's not your own code ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi
I am using the following statement:
cmdSearch.CommandText = "select doctitle, filename, characterization, hitcount from SCOPE
('" /dotNet "') where FREETEXT ( '" + searchText + "') ";
but it is showing an error for /dotnet, it has a problem with the /
How can I edit the query so it allows the /, is it a banned character so to speak
thanks
|
|
|
|
|
/ is used as an escape character. For example /" is how you put quotes in your string. Putting a @ at the start of the string turns these off, and will fix your code. Or you can use // to escape a /.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
thanks for the reply
I am using the article below
http://www.codeproject.com/KB/aspnet/IndexingServer.aspx
and trying to include the following line:
FROM SCOPE(' SHALLOW TRAVERSAL OF ("/", "/Help") ')
but it wont allow me to add it as it says there is a syntax error, why would this be?
thanks!
string selectintranetquery = "select doctitle, filename, vpath, rank, characterization, hitcount
FROM SCOPE(' SHALLOW TRAVERSAL OF ("/", "/Myfile") ') where FREETEXT(Contents, '" + searchText + "') order by rank asc ";
|
|
|
|
|
for the reason I told you, but in reverse. C# can't tell when you mean a " to be in the string, because you're not escaping it.
string selectintranetquery = @"select doctitle, filename, vpath, rank, characterization, hitcount
FROM SCOPE(' SHALLOW TRAVERSAL OF (""/"", ""/Myfile"") ') where FREETEXT(Contents, '" + searchText + "') order by rank asc ";
note that you use "" to get quotes when using @.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
cheers that worked!
thanks
|
|
|
|
|
Christian Graus wrote: / is used as an escape character.
No, it's not. You are thinking of the backslash character: \
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi friends
I have a page where an is present.
Am setting the src of this image dynamically.
If img1.src = "" or empty, i dont want the cross ('X') symbol to be displayed.
Instead, some image which gives some meaning should be displayed.
Can anyone please help me out?
Thanks!
~VSree
modified on Wednesday, May 21, 2008 6:48 AM
|
|
|
|
|
You can't. You need to set the src to the image you want to show. binarywrite only works to send an image through a http handler if you want to show more than just the image.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi,
I have category list in HTML page. when I click on computer category, sub category of computer will be display on HTML page.
e.g.
computer->Intel
Like above there are 4-5 categories under computer. Also there are some main category like cameras,Gifts etc.
Every time when I click some category static HTML page of subcategory called and in that static page bottom of the page string like above(computer->Intel) is display.
This all happening in HTML page.
Now I want to pass computer->Intel string to .aspx page.
How can I do this?
Thanks
|
|
|
|
|
You need to put the values on your link, and read them off the query string.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
1.Passing the value through query string
2.If the action is mapped to the aspx page in your HTML form then you can access the fields through Request object in your aspx page.
i.e something like this..
...
3.I think it can be passed through session also ...but I'm not sure!! Google it.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
3 - no. How would a html page put something in the session, which is on the server ? It would have to be turned in to an ASPX
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
As i said earlier I'm not sure about it...Thanks for confirming it Actually long back I've read an article about it so i was little apprehensive.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Spunky Coder wrote: I've read an article
Possibly an incomplete read of the article. That article should have guided you a postback to the server either through an hidden form or XmlHttp to an ASPX page that does the saving the data to a session store.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hello!
I´ve got a number of validators on a page. I display the errormessages they generate in a ValidationSummary-control. I dont want the actual errormessage to show twice, so I´ve got property Display set to None on all the validators. Problem is this:
Im in a textbox with a requiredfieldvalidator pointed at it. I press enter, and nothing happens. No error message in the summarycontrol, no nothing. If I remove the Display=None from the validator I get the errormessage, but only in the validator not in the summary. I´ve got EnableClientScript set to true on my summarycontrol, shouldnt I get the errormessage there right away? Not I´ve got to press a button or something in order for the errormessage to show there.
|
|
|
|
|
There's two properties ( text and error from memory ), and you can set one to blank and the other to the text for the summary. If you set only one, they both are teh same.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Thanks for your reply. But I don´t understand exactly what you mean. Does the Summary-control have two properties I need to set? This is what it looks like now:
<asp:validationsummary id="valSummary">
runat="server"
DisplayMode="List"
ShowSummary="true"
EnableClientScript="true"
ShowMessageBox="false"
HeaderText="yadayada></asp:validationsummary>
|
|
|
|