|
Okay, Mike, here is what I need. I will need to display on my form each visitor's respective date and time. I kind of know that this can only be achieved by a client-side script like Javascript (eg, GetCurrentDateTime()).Upon submission of the form I am exporting the html form to word document and sending as an attachment. When I export form to word, the date time value loaded by Javascript (on a label) doesn't get exported, strangely. I will need to figure out a way to pass the datetime value from javascript to ASP.NET and then display it on the form. This will then surely get exported to word. I hope this makes sense. Thanks.
|
|
|
|
|
tjkota wrote: Okay, Mike, here is what I need.
Great. In the future see if you can post what you need in fewer than 4 posts.
Using ASP.NET to send data from the browser to the Server you can use any number of ASP.NET form controls.
For example you can use a hidden TextBox control that has attached to it the javascript that will fill the text value of the control when it executes in the browser.
Now when the form is submitted back to the ASPX page the data is available to the code behind in the .Value property of the control. Of course this value is type "string" not Date.
You can use the C# Date object to parse the string so that you can use the resulting Date object to format the Date in any way you like for output as a "string" to the "Word" ( I guess that means a Microsoft Word Document).
led mike
|
|
|
|
|
led mike wrote: Great. In the future see if you can post what you need in fewer than 4 posts.
Hey - that would sort of bring his post count down.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
There is an ItemMouseHover event for listview but there isn't any ItemMouseLeave event. I want to change my listview item colors without actally clicking on them first. Thanks
|
|
|
|
|
Color the one your on however you want, then return the color to normal when you hover over a new one. This requires you to remember the last item the mouse was over.
|
|
|
|
|
Hello AGAIN again again:
there aren't articles (that I've found, honestly) about an input class in XNA. Can someone PLEASE tell me how to exit a game from a second class, with classes A and B, A being the Game1 and B being Input. I'm tired of looking around without luck. Thanks for at least reading.
- I love D-flat!
|
|
|
|
|
|
Most of those articles focus on methods to do this which I know, not classes, and what page is the Ziggyware article on?
- I love D-flat!
modified on Friday, February 15, 2008 3:18 PM
|
|
|
|
|
There is no article that exactly matches your question, but it's a pretty basic one.
To exit a game all you need to do is something like
if(Keyboard.GetState().IsKeyDown(Keys.Escape))
Game.Exit();
So basically you just need a Game instance variable to be available anywhere in your app, for example by using a static variable.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I've tried that (for the main class) in other classes with this exact code, but it doesn't exit.
- I love D-flat!
|
|
|
|
|
Really, your game shouldn't be exiting from a child class. Any child classes should be notifying the parent classes that an exit is required. Your top level code should be doing the cleanup and exiting.
|
|
|
|
|
Really? I thought everything for input goes in the Input class.ShouldI keep input unified with the main class?
- I love D-flat!
|
|
|
|
|
Exiting an application is not input. It's more of a "command" or "request". It's up to the input processor to create the appropriate command to send back to the main loop of your game.
|
|
|
|
|
Oh, well... Thanks. But, it seems that I can't check 'input' in any class but the main? Can I please have a brief concept example?
- I love D-flat!
|
|
|
|
|
Pass the game class over to the child class in the constructor and use the game.Exit() method from there.
It's no more complicated than that.
You can use the XNA.Framework.Input.Keyboard.GetState(PlayerIndex playerIndex).IsKeyDown(Keys key) method to check for key presses.
In future, like someone said above, use the XNA creators forums. They are very good, and have the guys who wrote the framework constantly posting.
Mark.
|
|
|
|
|
Why are most articles in C# rather than vb.net?
Can you list advantages of C# over vb.net?
Certified VB6, SQL 7 and ASP developer
|
|
|
|
|
Parthasarathy Mandayam wrote: Can you list advantages of C# over vb.net?
No, because it's been covered about a bazillion times all over the web.
So what if the code is written in C#. It's not that much different than VB.NET. Most of the code you see is using the .NET Framework classes and has very little to do with the language itself. It also wouldn't kill you to learn it. Why limit yourself to just one language.
If you want a Rosetta stone, showing you the same code snippets in both languages, there's thousands of examples all over the .NET Framework documentation on MSDN.
|
|
|
|
|
Dave,
I agree with you. Further more, if you have a copy of Lutz Roedoer's Reflector for .NET[^], then you have all .NET languages. Once you open up an assembly with that tool, you can convert it to another language with the click of drop down box.
Hogan
|
|
|
|
|
Yes, I do have it. It doesn't support ALL the languages that target the .NET CLR, but it does cover the major ones.
|
|
|
|
|
Dave Kreskowiak wrote: It also wouldn't kill you to learn it. Why limit yourself to just one language.
I agree that it wouldn't hurt to know both.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Parthasarathy Mandayam wrote: Why are most articles in C# rather than vb.net?
Because most people here have a fanatical hatred of VB.
Kevin
|
|
|
|
|
That's just a stupid answer.
In the past, it was true that the average VB developer was at a lower level than the average C++ developer, and there was a short term flow effect to C#. I'd say that's no longer true.
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: That's just a stupid answer.
No, it's not, it's a true answer. A true answer can't be stupid.
Kevin
|
|
|
|
|
Parthasarathy Mandayam wrote: Can you list advantages of C# over vb.net?
No I can't. That's not to say I think one is better than the other - it's too subjective, and is a matter of personal perspective. I prefer C#, but that's because of my C background (and I just happen to think the syntax is cleaner) - VB programmers tend to prefer VB.NET. Ultimately, they both work with the .NET framework, so you can't realistically choose one over the other as being better.
|
|
|
|
|
i was having the same problem about a year ago. so, i learned c#. it didn't take me more than 2 hours to switch to c# from vb.net
Eslam Afifi
|
|
|
|