Showing posts with label write. Show all posts
Showing posts with label write. Show all posts

Saturday, March 31, 2012

Subrotine

Hi !
Greetings to all!
Can anybody explain why we have to write "s as object, e as eventargs " in sub routine.
with advance thanx
VijayWhen using event handlers these objects are used to provide your event handler with info about the event and what object caused the event.
Hi Vijay,

s is the object which called the subroutine and
e is the arguments of the event associated with the object.

If you are using Visual Studio then try the different properties of s and e

hope this helps

Wednesday, March 28, 2012

Subtracting Date in VB.Net

Need Help!

How do I write the following expression for my project limiting the number of entries on my datagrid by 30 days from Now():

<!--

SELECT * FROM tblGrid WHERE dateEntered between Now() - 30 and Now()

-->

note: dateEntered are the dates in my date field (mm-dd-yyyy)

Thanks a lot.

If you are using VB.NET, you can use DateTime.Add method. There's an exampe in the docs here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatetimeclassaddtopic.asp

Saturday, March 24, 2012

super simple asp question

I'm tryinh to write a restricted character into a variable and i'm not sure what the replacement is.

Basically I want to put a " inside a variable string.

like:

Body = "And he said: "blah blah blah." "

Any idea how to do that and not have the string break?

i'm going to be writing xml with asp and pulling data from a form and I know xml is really sensitive and an apostraphe over quotations won't cut it.

Thanks.

well i know for c# it is string mystring = "hello world\\". you have to use double the \

EDIT: not sure why i used \ in the example, but for a quote you do it the same way string mystring = "hello \"world\"'; giving you hello "world"


In VB.NET you simply double your quotes like so:

Dim strTest As String = "President Bush said ""No Comment"" in response to my question."


ok i'll try these, thanks for your help :)