15,920,896 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by mayankshrivastava (Top 112 by date)
mayankshrivastava
27-Apr-12 3:04am
View
leave type is varchar,and above querry is works fine.
i want to add one more coloumn is leave type.
mayankshrivastava
27-Apr-12 2:12am
View
It works Fine.
Thanks DEEPTI :)
mayankshrivastava
26-Apr-12 4:27am
View
gives the following error-
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
mayankshrivastava
21-Apr-12 6:27am
View
following error - Column 'd.ActivityName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
mayankshrivastava
18-Apr-12 2:05am
View
I followed your links and made a foreign key.
But when i insert data in first table ppsID in not insert into second table.
is there any code write in insert query of first table ?
mayankshrivastava
18-Apr-12 1:52am
View
how to write this,
actually i don't no more about foreign key.
mayankshrivastava
18-Apr-12 1:48am
View
ya sory i want in ado.net or sql server
mayankshrivastava
18-Apr-12 1:23am
View
Hi, Thanx from reply.
but its not working properly.
if there s 2 rows in first table and 1 row in second table so it give two rows with repeat values of second table.
mayankshrivastava
13-Apr-12 2:43am
View
its not working...
mayankshrivastava
11-Apr-12 5:06am
View
gives a error "Object reference not set to an instance of an object. "
on lnkedit.Visible = true;
mayankshrivastava
11-Apr-12 5:05am
View
lnkedit.visible =true;
there gives a error.
mayankshrivastava
10-Apr-12 5:34am
View
i am using this but it gives error
"Object reference not set to an instance of an object. "
if (GridView1.Rows.Count >= 1)
{
LinkButton lnkedit = (LinkButton)GridView1.FindControl("lnkedit");
lnkedit.Visible = true;
}
mayankshrivastava
15-Mar-12 3:20am
View
Thanks ...
mayankshrivastava
15-Mar-12 1:54am
View
i want to check whether the same time in time is entered or not.
i am using this code-
string totalDateStart = txtStartDate.Text.Trim() + " " + txtSHr.Text.Trim() + ":" + txtSMin.Text.Trim() + ":00" + " " + ddlAM1.SelectedValue;
DateTime StrDate = Convert.ToDateTime(totalDateStart);
i get startdate.
user insert in dd/mm/yyyy hh:mm:ss format.
and in database i use startdate as datetime format so it automatically take
yyyy-mm-dd hh:mm:ss.000 format.
mayankshrivastava
14-Mar-12 2:47am
View
Ok,any suggestion how to convert it in c# code ?
mayankshrivastava
14-Mar-12 2:24am
View
same error...
mayankshrivastava
1-Mar-12 6:39am
View
Thanks for reply SAKryukov,
actually my project is that i want to open a word file in a text box or rich text box with images and texts.Then i want to all sentences starting from new line then want to read line by line sentences.
mayankshrivastava
1-Mar-12 3:41am
View
of cos firstly i search in Google, then only i uploaded a question here...
mayankshrivastava
1-Mar-12 3:40am
View
Deleted
so many times...
mayankshrivastava
25-Feb-12 3:36am
View
thanks fro reply Adersh
your querry works fine in sql query analyzer.
problem is that how to write in asp.net.
what is use executenonquerry or something else.
nd how to use it.
how to use return value?
i am new in asp.net
mayankshrivastava
24-Feb-12 3:15am
View
vertically .........
there are two columns in gridview (date,employeename).i want to append them.
mayankshrivastava
24-Feb-12 1:47am
View
Thanks alot...
mayankshrivastava
24-Feb-12 1:35am
View
startdate not in employee table
its in timesheet table
mayankshrivastava
21-Feb-12 2:19am
View
ya i tried not exists clause.
mayankshrivastava
20-Feb-12 7:05am
View
HI,thanks fro reply ..i want to save my data as .csv format and my project is in web application and database is in sql server.
mayankshrivastava
14-Feb-12 1:42am
View
I run this project in 4 machines In 3 machine project is working properly but one machine its not working . In all machine office 2007 is installed. I think its operating system problem or something else.
mayankshrivastava
14-Feb-12 1:41am
View
I run this project in 4 machines In 3 machine project is working properly but one machine its not working .
In all machine office 2007 is installed.
I think its operating system problem or something else.
mayankshrivastava
13-Feb-12 7:46am
View
"word experienced in error try to opening the file"
mayankshrivastava
13-Feb-12 1:28am
View
i am using this code for open a word file-
<pre lang="cs">
Microsoft.Office.Interop.Word.ApplicationClass wordObject = new Microsoft.Office.Interop.Word.ApplicationClass();
object File = txtfilepath.Text; //this is the path
object nullobject = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordobject = new Microsoft.Office.Interop.Word.Application();
wordobject.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsNone;
Microsoft.Office.Interop.Word._Document docs = wordObject.Documents.Open(ref File, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject);
docs.ActiveWindow.Selection.WholeStory();
docs.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
rtbgermanfile.Text = data.GetData(DataFormats.Rtf).ToString();
string name = rtbgermanfile.Text.Trim();
name = String.Join(Environment.NewLine, name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries));
string newtext = name.Replace("\n\n", "\n");
string newtext2 = newtext.Replace("\n\n", "\n");
rtbgermanfile.Text = newtext2.ToString();
txtwriteingerman.Text = rtbgermanfile.Lines[0];
docs.Close(ref nullobject, ref nullobject, ref nullobject);
wordobject.Quit(ref nullobject, ref nullobject, ref nullobject);
//wordobject.Quit(SaveChanges:false, OriginalFormat: false, RouteDocument: false);
System.Runtime.InteropServices.Marshal.ReleaseComObject(wordobject);
txtwriteinenglish.Focus();
</pre>
but it open only text not image.
mayankshrivastava
7-Feb-12 10:12am
View
Thanks ...it works...
mayankshrivastava
7-Feb-12 8:37am
View
Hi, when i press enter in a txtwriteenglish.Text then text is goes on second text it works fine but then i want to clear txtwriteenglish.Text.The text box is clear but cursor is start from second line of txtwriteenglish.Text.
mayankshrivastava
7-Feb-12 8:10am
View
Thanks ..
mayankshrivastava
7-Feb-12 8:06am
View
Deleted
suppose i write some text in a first text box and press enter then i want same text of first text box copy into second text box.
mayankshrivastava
6-Feb-12 8:26am
View
suppose there are two columns in excel sheet german and english
so when i click on button i want these two column values(A2) in first text boxs and B2 in second text box.
and when i click again in button i want next two values A3 in first text box and B3 in second text box.
mayankshrivastava
6-Feb-12 5:37am
View
actually i am searching that particular word in another textbox.
mayankshrivastava
6-Feb-12 5:33am
View
i don't know how to open excel data in datagrid view on every click
mayankshrivastava
6-Feb-12 4:06am
View
i want to just open a word file in RTB with existing images.
mayankshrivastava
4-Feb-12 4:06am
View
for example- open any word file and write something then close it show's message and when u already save the file it doesn't show any message and directly close the application.
mayankshrivastava
4-Feb-12 4:01am
View
Thanks for reply sridhar,
when i open my project text box is empty.suppose i wrote something in text box and exit the application without saving this text i want a message "The document has still not been saved. Are you sure you want to close the application?" ok
but when i wrote something in text box and save the text box data as a word file and close the application i want directly exit don't show any message.because i already save the data.
mayankshrivastava
31-Jan-12 7:58am
View
thanks...
mayankshrivastava
31-Jan-12 7:58am
View
thanks...
mayankshrivastava
30-Jan-12 5:58am
View
Thanks a lot for code.....
5 stars........
mayankshrivastava
30-Jan-12 4:50am
View
Thanks for reply Amir,
how to use your special code?
mayankshrivastava
27-Jan-12 4:37am
View
thanks anuja..
how to do this ?
actually i m new in code project .
mayankshrivastava
27-Jan-12 4:34am
View
it is possible from rich text box ?
mayankshrivastava
24-Jan-12 6:05am
View
Deleted
<pre lang="prevIndex = txtshowfile.Text.IndexOf(txtsearchgerman.Text, prevIndex + 1);
txtshowfile.Tag = prevIndex;
index = prevIndex;"></pre>
mayankshrivastava
23-Jan-12 4:54am
View
Deleted
i am using another code its working for one line
the code is-
int index = 0;
int textEnd = txtshowfile.TextLength;
for (int i = 0; i < txtshowfile.Lines.Length; i++)
{
int lastIndex = txtshowfile.Lines[i].LastIndexOf(txtsearchgerman.Text);
while (index < lastIndex)
{
txtshowfile.Find(txtsearchgerman.Text, index, textEnd, RichTextBoxFinds.None);
txtshowfile.SelectionBackColor = Color.Yellow;
index = txtshowfile.Lines[i].IndexOf(txtsearchgerman.Text, index) + 1;
flag1++;
}
break;
}
but when i again click on button it takes i=o;so it again take firsts line.i want to declare i as a global ?
mayankshrivastava
23-Jan-12 4:54am
View
Deleted
i am using another code its working for one line
the code is-
int index = 0;
int textEnd = txtshowfile.TextLength;
for (int i = 0; i < txtshowfile.Lines.Length; i++)
{
int lastIndex = txtshowfile.Lines[i].LastIndexOf(txtsearchgerman.Text);
while (index < lastIndex)
{
txtshowfile.Find(txtsearchgerman.Text, index, textEnd, RichTextBoxFinds.None);
txtshowfile.SelectionBackColor = Color.Yellow;
index = txtshowfile.Lines[i].IndexOf(txtsearchgerman.Text, index) + 1;
flag1++;
}
break;
}
but when i again click on button it takes i=o;so it again take firsts line.i want to declare i as a global ?
mayankshrivastava
23-Jan-12 4:52am
View
hi,i have a one richtextbox as txtshowfile and one text box as txtsearchgerman and one button ok suppose there is a 10 sentences in txtshowfile line by line.i want to search a one word from txtshowfile.that word i write in txtsearchgerman ok. when i click on button then i want specific search word as highlight.it works but i want line by line check . if In first line there are three specific words then i want all three word highlighted. Hope you understand. its urgent please help me out.
mayankshrivastava
23-Jan-12 4:07am
View
hi,i have a one richtextbox as txtshowfile and one text box as txtsearchgerman and one button ok
suppose there is a 10 sentences in txtshowfile line by line.i want to search a one word from txtshowfile.that word i write in txtsearchgerman ok.
when i click on button then i want specific search word as highlight.it works
but i want line by line check .
if In first line there are three specific words then i want all three word highlighted.
Hope you understand.
its urgent please help me out.
mayankshrivastava
23-Jan-12 3:56am
View
Thanks for reply
its working but i want if in first line there are more then one specific word so all are highlighted.
mayankshrivastava
20-Jan-12 9:11am
View
i am using this code
<pre lang="c#">
if (txtsearchgerman.Text.Length > 0)
{
startindex = FindMyText(txtsearchgerman.Text.Trim(), start, txtshowfile.Text.Length);
// If string was found in the RichTextBox, highlight it
if (startindex >= 0)
{
// Set the highlight color as red
//txtshowfile.SelectionColor = Color.Red;
txtshowfile.SelectionBackColor = Color.Red;
// Find the end index. End Index = number of characters in textbox
int endindex = txtsearchgerman.Text.Length;
// Highlight the search string
txtshowfile.Select(startindex, endindex);
// mark the start position after the position of
// last search string
start = startindex + endindex;
}
public int FindMyText(string TxtToSearch, int searchStart, int searchEnd)
{
// Unselect the previously searched string
if (searchStart > 0 && searchEnd > 0 && indexofsearchtext >= 0)
{
txtshowfile.Undo();
//txtenglishtext.Undo();
}
// Set the return value to -1 by default.
int retvalue = -1;
// A valid starting index should be specified.
// if indexOfSearchText = -1, the end of search
if(searchStart >= 0 && indexofsearchtext >=0)
{
// A valid ending index
if (searchEnd > searchStart || searchEnd == -1)
{
// Find the position of search string in RichTextBox
indexofsearchtext = txtshowfile.Find(TxtToSearch, searchStart, searchEnd, RichTextBoxFinds.None);
//indexofsearchtext = txtenglishtext.Find(TxtToSearch,searchStart,searchEnd,RichTextBoxFinds.None);
// Determine whether the text was found in richTextBox1.
if (indexofsearchtext != -1)
{
// Return the index to the specified search text.
retvalue = indexofsearchtext;
}
}
}
return retvalue;
}
</pre>
it works but now i want to search sentence by sentences and also count the word how many times occurs.
mayankshrivastava
20-Jan-12 5:21am
View
Thanks for reply i already use this link but problem is that how to get word from excel sheet.
mayankshrivastava
20-Jan-12 5:07am
View
Ops ya its a desktop application .......
mayankshrivastava
18-Jan-12 6:11am
View
Dear mukund,
Thanks for reply but i want to save a file using save file dialog box.
mayankshrivastava
11-Jan-12 8:14am
View
can't understand ?
Please clear it.
mayankshrivastava
7-Jan-12 9:20am
View
Please resend your link...it doesn't works
thanks
mayankshrivastava
7-Jan-12 8:05am
View
thanks for reply OriginalGriff
mayankshrivastava
7-Jan-12 8:02am
View
how read or write the word file?
actually i am new in programing.
mayankshrivastava
7-Jan-12 7:57am
View
when i am giving the name of file it take and save but when i am going to path where i save the file there is no file of that name.
mayankshrivastava
7-Jan-12 6:13am
View
Deleted
and if i am over write with some another word file it saves the new file.
mayankshrivastava
7-Jan-12 6:13am
View
thanks for reply sridhar..
when i am saving the new file it gives me message -
file c:\newfile.docx does not exist.verify that the correct file name was given.
mayankshrivastava
7-Jan-12 5:03am
View
Dear supriya,i got the code for save the file but i want to save a file from "save as" diaolog box.
and thank's for reply.
mayankshrivastava
7-Jan-12 4:57am
View
thanks for code sridhar it works.
but when i am clicking a button event i want's "save as file" dialog box. then i save a word file in my location .
mayankshrivastava
6-Jan-12 7:17am
View
Thanks Supriya..........
it works....
mayankshrivastava
6-Jan-12 7:12am
View
Deleted
supriya it doesn't work
it replaces the existing word..:(
mayankshrivastava
6-Jan-12 4:48am
View
thanks...OriginalGriff...
mayankshrivastava
5-Jan-12 11:22am
View
acually i am new in coding how can we do this if u dont mind .
mayankshrivastava
5-Jan-12 11:13am
View
i want loop or kind of method which handle n sentences. because when i click on button control textbox2 should be change into next sentence.
mayankshrivastava
5-Jan-12 11:11am
View
suppose i have 5 sentences than ...
mayankshrivastava
5-Jan-12 10:55am
View
thanks it works..
but when i click a button event than i want next sentence in in text box 2 and than again when i click on button than i want 3rd sentence on text box 2.
Please reply
mayankshrivastava
5-Jan-12 10:27am
View
my code is that-
<pre lang="c#">
string name = txtshowfile.Text;
name = String.Join(Environment.NewLine, name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries));
txtshowfile.Text = name.ToString();
</pre>
i want when first sentence goes to second text box and i click on button than i want next sentence in the second text box.
mayankshrivastava
4-Jan-12 10:19am
View
for example-
word file contains data-
my name is mayank.i am software engineer.i live in mumbai.
so i want these three sentences in a separate line like-
my name is mayank.
i am software engineer.
i live in mumbai.
mayankshrivastava
4-Jan-12 10:17am
View
go through this link-
http://www.programmerfish.com/quick-tutorial-how-to-read-microsoft-word-file-in-c/
i am making this.it works.
but when a word file open in textbox i want every sentence in a new line.
mayankshrivastava
4-Jan-12 9:55am
View
any other ideas..mr. rajesh ?
mayankshrivastava
4-Jan-12 9:45am
View
yes..
mayankshrivastava
4-Jan-12 9:43am
View
i am using this its correct but its not working in text box.
mayankshrivastava
4-Jan-12 8:52am
View
dats my code-
Microsoft.Office.Interop.Word.ApplicationClass wordObject=new Microsoft.Office.Interop.Word.ApplicationClass(); object File=txtfilepath.Text; //this is the path object nullobject=System.Reflection.Missing.Value; Microsoft.Office.Interop.Word.Application wordobject = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Interop.Word._Document docs = wordObject.Documents.Open(ref File, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject, ref nullobject); docs.ActiveWindow.Selection.WholeStory(); docs.ActiveWindow.Selection.Copy(); IDataObject data = Clipboard.GetDataObject(); txtshowfile.Text = data.GetData(DataFormats.Text).ToString(); string name = txtshowfile.Text; name = name.Replace('.','\n'); docs.Close(ref nullobject,ref nullobject,ref nullobject); wordobject.Quit(ref nullobject,ref nullobject,ref nullobject);
i am open word file in text box. it works fine. but now i want if in .docx file there are lot of sentences than i want these sentences in a particular line in same text box.
mayankshrivastava
4-Jan-12 8:51am
View
Microsoft.Office.Interop.Word.ApplicationClass wordObject=new Microsoft.Office.Interop.Word.ApplicationClass();
object File=txtfilepath.Text; //this is the path
object nullobject=System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Application wordobject = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word._Document docs = wordObject.Documents.Open(ref File, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject,
ref nullobject, ref nullobject, ref nullobject, ref nullobject);
docs.ActiveWindow.Selection.WholeStory();
docs.ActiveWindow.Selection.Copy();
IDataObject data = Clipboard.GetDataObject();
txtshowfile.Text = data.GetData(DataFormats.Text).ToString();
string name = txtshowfile.Text;
name = name.Replace('.','\n');
docs.Close(ref nullobject,ref nullobject,ref nullobject);
wordobject.Quit(ref nullobject,ref nullobject,ref nullobject);
i am open word file in text box.
it works fine.
but now i want if in docx file there are lot of sentences than i want these sentences in a particular line.
mayankshrivastava
4-Jan-12 6:54am
View
it gives error
<pre lang="text">Debug does not exist in current context</pre>
mayankshrivastava
4-Jan-12 6:24am
View
<pre lang="c#">
docs.ActiveWindow.Selection.WholeStory();
</pre>
mayankshrivastava
4-Jan-12 6:24am
View
it gives me error in that line-
docs.ActiveWindow.Selection.WholeStory();
mayankshrivastava
4-Jan-12 6:21am
View
it doesn't work ..
same error
mayankshrivastava
4-Jan-12 4:51am
View
it doesn't work!
mayankshrivastava
2-Jan-12 10:18am
View
i just want compare from these two word files and if words are not similar than it gives a message .
mayankshrivastava
2-Jan-12 8:07am
View
actually i want to compare.
like in excel file i have 2 columns german and english
in greman r1c1 i write "LL" and in english column r1c2 i write "MY"
and suppose two word files are greman.docx and english.docx
so i want to compare if german.docx file contain word "LL" than english.docx file also contain word "MY" .
mayankshrivastava
29-Dec-11 10:47am
View
hi i have question a basis on excel file and word file and think so you might be help me out.
i have two ms word document file (2007) save as German.doc and English.doc and one ms office excel file (2007) save as dictionary.xls.
I made two columns in dictionary.xls , German in r1c1 and English in r1c2
Now I write word "LL" in r2c1 and in r2c2 word "MY" in excel file.
now i just wanted to check if German.doc contains word "LL" so it should be write on English.doc as "MY".
References-
http://www.vbaexpress.com/forum/showthread.php?t=33093[^]
http://www.vbaexpress.com/kb/getarticle.php?kb_id=553[^]
but this code is on VB.
Please help me out.
Thanks ......
mayankshrivastava
29-Dec-11 6:38am
View
No i don't want word addin and what is VSTO?
I just want to check thorough dictonary.xls if there is any sentence or word similar to dictionary.xls ric1 column so it should be in english.doc similar to r1c2 column.
mayankshrivastava
29-Dec-11 5:00am
View
how to check errors ?
I don't no anything about vb.net
mayankshrivastava
29-Dec-11 4:44am
View
i tried this but it cant convert the code.
mayankshrivastava
27-Dec-11 7:39am
View
My Pleasure...
mayankshrivastava
27-Dec-11 7:16am
View
thaks supriya
mayankshrivastava
27-Dec-11 7:14am
View
thanks ....
mayankshrivastava
27-Dec-11 7:06am
View
m trying to subtract selected date from integer
my code is-
DateTime dt = new DateTime();
dt = Calendar.SelectedDate;
dt = dt.AddDays(Convert.ToInt32(txtadd.Text));
lblgetdate.Text = dt.ToLongDateString();
DateTime sDate = new DateTime();
sDate = Calendar.SelectedDate;
DateTime eDate = new DateTime();
eDate = Convert.ToDateTime(lblgetdate.Text);
DayOfWeek fWeek = DayOfWeek.Friday;
int totCount = findWeekCount(sDate, eDate, fWeek);
lblweekday.Text = totCount.ToString();
lbldate.Text = dt.Subtract(new TimeSpan(totCount)).ToString();
mayankshrivastava
27-Dec-11 7:03am
View
date time
mayankshrivastava
27-Dec-11 6:55am
View
my code is-
dt.Subtract(new TimeSpan(totCount)).ToString();
but it subtract only one day where as count is 1,2,3,4,5,6..etc
mayankshrivastava
27-Dec-11 5:52am
View
and thnaks for giving me this code.
mayankshrivastava
27-Dec-11 5:52am
View
here if i want a output like Thursday, December 29, 2011 and no time reqiured.
mayankshrivastava
27-Dec-11 5:36am
View
here is my code
DateTime dt = new DateTime();
dt = Calendar.SelectedDate;
dt = dt.AddDays(Convert.ToInt32(txtadd.Text));
lblgetdate.Text = dt.ToLongDateString();
DateTime sDate = new DateTime();
sDate = Calendar.SelectedDate;
DateTime eDate = new DateTime();
eDate = Convert.ToDateTime(lblgetdate.Text);
DayOfWeek fWeek = DayOfWeek.Friday;
int totCount = findWeekCount(sDate, eDate, fWeek);
lblweekday.Text = totCount.ToString();
i want to subtract (lblgetday - lblweekday)
Please help me.
mayankshrivastava
27-Dec-11 4:36am
View
DateTime dt = new DateTime();
dt = Calendar.SelectedDate;
dt = dt.AddDays(Convert.ToInt32(txtadd.Text));
lblgetdate.Text = dt.ToLongDateString();
DateTime sDate = new DateTime();
sDate = Calendar.SelectedDate;
DateTime eDate = new DateTime();
eDate = Convert.ToDateTime(lblgetdate.Text);
DayOfWeek fWeek = DayOfWeek.Friday;
int totCount = CountDayOcurrence(sDate, eDate, fWeek);
lblweekday.Text = totCount.ToString();
i want to subtract lblgetdate from lblweekday.
mayankshrivastava
27-Dec-11 4:31am
View
DateTime dt = new DateTime();
dt = Calendar.SelectedDate;
dt = dt.AddDays(Convert.ToInt32(txtadd.Text));
lblgetdate.Text = dt.ToLongDateString();
DateTime sDate = new DateTime();
sDate = Calendar.SelectedDate;
DateTime eDate = new DateTime();
eDate = Convert.ToDateTime(lblgetdate.Text);
DayOfWeek fWeek = DayOfWeek.Friday;
int totCount = CountDayOcurrence(sDate, eDate, fWeek);
lblweekday.Text = totCount.ToString();
i want to subtract lblgetdate from lblweekday.
mayankshrivastava
26-Dec-11 9:21am
View
suppose i select a start date today its 26th dec and in text box i put 15 than the answer is 10th Jan but i want only 6 days in a week(except Friday) that's means i want ans is 12th Jan because there are two Fridays in between 26th to next 15 days(30th DEC and 6th Jan).
mayankshrivastava
26-Dec-11 9:12am
View
sir, i want all start to end date's except friday.. what kind of code i have to write ?
please reply
mayankshrivastava
26-Dec-11 9:09am
View
sir,
i want all start to end date's except friday..
what kind of code i have to write ?
please reply
mayankshrivastava
26-Dec-11 8:56am
View
thanks...
mayankshrivastava
26-Dec-11 8:34am
View
my text box is not working.. dt = dt.AddDays("?"); i have to pass text box value.. how i pass ? it takes bool value. please reply
mayankshrivastava
26-Dec-11 8:34am
View
my text box is not working.. dt = dt.AddDays("?"); i have to pass text box value.. how i pass ? it takes bool value. please reply
mayankshrivastava
26-Dec-11 8:34am
View
my text box is not working.. dt = dt.AddDays("?"); i have to pass text box value.. how i pass ? it takes bool value. please reply
mayankshrivastava
26-Dec-11 8:25am
View
ya thanks a lot i got it....
please solve my another query
my text box is not working..
dt = dt.AddDays("?");
i have to pass text box value..
how i pass ?
it takes bool value.
please reply
mayankshrivastava
26-Dec-11 7:14am
View
how ?
i am using calander contorl.
mayankshrivastava
26-Dec-11 7:10am
View
i am using calander contorl?
mayankshrivastava
26-Dec-11 6:58am
View
thanx for reply...
it works but when i select another date it takes only today's date???
Show More