TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajaa Khalifeh
NA
53
6.5k
Get Date on query string in asp.net c#
Apr 19 2020 9:18 AM
I am trying to send date format with dd/mm/yyyy in a hypelink field to another page , on page load for the b form iam trying t get this date but it is not working with me..
GridView Data:
<asp:HyperLinkField Text=
"Edit"
Target=
"_blank"
DataNavigateUrlFields=
"PackageId,StdId,CoachName,StdName,Sessions#,start_Date,Status,Remark"
DataNavigateUrlFormatString=
"EditAddPack.aspx?PackageId={0}&StdId={1}&CoachName={2}&StdName={3}&Sessions#={4}&start_Date={5:dd/MM/yyyy}&Status={6}&Remark={7}"
/>
and the another form :
editstarttxt.Text = Convert.ToDateTime(Request.QueryString["start_Date"]).ToString("dd/MM/yyyy") // the value that
i get is 01/11/0001 which is not the date ,
i also tried this but also an error occurs
DateTime.ParseExact(Request.QueryString["start_Date"].ToString(),"dd/MM/yyyy",null).ToString("yyyy-MM-dd"));
also didn't work
Reply
Answers (
2
)
which way to access a base class function or variable
show data from other thread(data come out very fast (100us))