Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


how to count no. of days between code in asp.net (aspx.cs)


how to count no. of days between code in asp.net (aspx.cs)

Poll
Count no. of days between from date and to date

50% - 1 vote Hi All,
50% 1 vote
0% - 0 votes 1.Anybody help regarding my requirements i wanted codebehind page(aspx.cs) i need to count no. of days between From date and to date which i am passing in my frontend application txtfromdate,txttodate i need to count number of days between those dates which was comming from Frontend (txtfromdate,txt
0% 0 votes
0% - 0 votes 2.After getting count of no. of days b/w From date,todate i need substract from getting days(b/w fromdate,td) to no. of leaves(employyess)after this ineed to bind to gridview control after substract value will pass to gridview control.
0% 0 votes
50% - 1 vote Regards
50% 1 vote
0% - 0 votes ANAND.
0% 0 votes
Member Votes: 2, Guest Votes: 0. You don't have permission to vote within this poll.
Author
Message
anandbe21
anandbe21
Forum God
Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)Forum God (379 reputation)

Group: Forum Members
Posts: 1, Visits: 1
Hi All,

1.Anybody help regarding my requirements i wanted codebehind page(aspx.cs) i need to count no. of days between From date and to date which i am passing in my frontend application txtfromdate,txttodate i need to count number of days between those dates which was comming from Frontend (txtfromdate,txttodate)any code regarding this.

2.After getting count of no. of days b/w From date,todate i need substract from getting days(b/w fromdate,td) to no. of leaves(employyess)after this ineed to bind to gridview control after substract value will pass to gridview control.

Regards
ANAND.


anand

Mobius
Mobius
Forum God
Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)Forum God (103K reputation)

Group: Forum Members
Posts: 632, Visits: 1K
Welcome to A1vbcode, ANAND!



I will say this: if you want to compare dates like this, there are several methods for comparing dates. For instance, the "compareTo" method.



The rest of your inquiry wasn't very clear, so you might have to restate.



Also, I voted for the word "Regards". I like that word. Tongue





-Mobius

michael123
michael123
Forum God
Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)Forum God (373 reputation)

Group: Forum Members
Posts: 1, Visits: 2
Hi,It appears you are referencing an empty viewstate(object = nothing).



Try this....



If ViewState("VarName") ISNOT Nothing THen

'Do your stuff

TextBox1.Text = ViewState("VarName").ToString()

Else

'ViewState = Nothing

'Reset your viewstate...

SCOPE: it is only good for the life of the PAGE....redirect to same page sets it to nothing

End IF



If this doesn't solve it, strip your code down and paste it in the forum and I'll see if I can help out.


mcts | a+ certification | mcp | cissp

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search