15,885,309 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 Javascript questions
View Visual Basic 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 Member 9291223 (Top 30 by date)
Member 9291223
15-Jan-14 19:55pm
View
I tried to use the following but no luck:
int counter (int ran[],int user[])
{
int counter=0;
for (int i=0;i<5;++i)
{
int counter=0;
for (int j=0;j<5;++j)
{
if (ran[i] == user[j])
counter ++;
// cout << "There are" counter << "matches";
//cout << counter << ' ';
// Return an error, or print "error there is a duplicate value" etc
}
return counter;
}
Member 9291223
3-Dec-13 18:26pm
View
how about a lightbox..?
Member 9291223
2-Dec-13 21:30pm
View
Well it is supposed to be working on intranet and not internet. There must be a way around it.
Member 9291223
26-Nov-12 18:40pm
View
Ok say I do not want to show the actual path to the user so I kind of need to encrypt url
Member 9291223
21-Nov-12 17:58pm
View
But this works fine in local machine. Issues came after deployment
Member 9291223
21-Nov-12 17:00pm
View
In this line:
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
Member 9291223
20-Nov-12 14:10pm
View
Yes the piece of code will return the file name with extension and were as if only the file name is needed then I could have used Path.GetFileNameWithoutExtension(filepath);
Thanks
Member 9291223
19-Nov-12 22:19pm
View
Ya it does refers to the file path but sorry it didn't work out for me. Anyway thanks for the try. It was a good approach
Member 9291223
19-Nov-12 22:12pm
View
thanks but what does fileData in this refers to.? bw.Write(fileData); Is this the file path for that particular file?
Member 9291223
15-Nov-12 19:02pm
View
Yes all the requirement are installed. Event the cancel button event on that same modalpopup is working fine.Its just the Ok button isn't working
Member 9291223
6-Nov-12 22:25pm
View
The exception is occuring in this line:
count = aDoc.ComputeStatistics(stat, ref missing);
The localhost meaning in my local machine..as when the site was not deployed on the server.... and its a web application
Member 9291223
31-Oct-12 18:44pm
View
kindly noted
Member 9291223
31-Oct-12 18:11pm
View
well its a web application
Member 9291223
30-Oct-12 15:12pm
View
Actually im already doing what you have said.below is my code:
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
// give any file name of your choice.
string tempath = numberofpage;
RegexOptions options = RegexOptions.None;
Regex regex = new Regex(@"[ ]{2,}", options);
tempath = regex.Replace(tempath, @"");
tempath = tempath.Replace(" \\", "\\");
object fileName = tempath;
object readOnly = false;
object isVisible = true;
// the way to handle parameters you don't care about in .NET
object missing = System.Reflection.Missing.Value;
object objDNS = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges;
// Make word visible, so you can see what's happening
//WordApp.Visible = true;
// Open the document that was chosen by the dialog
Microsoft.Office.Interop.Word.Document aDoc = WordApp.Documents.Open(ref fileName,
ref missing, ref readOnly, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref isVisible);
Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;
count = aDoc.ComputeStatistics(stat, ref missing);
WordApp.Quit(ref objDNS, ref missing, ref missing);
aDoc = null;
WordApp = null;
GC.Collect();
Member 9291223
16-Oct-12 16:58pm
View
thanks alot.....
Member 9291223
15-Oct-12 16:39pm
View
I understood your code above but the problem is in the way that i bind my Datasource.Its actually a stored procedure used in databing and dropdown list is populated with a datasource.The below show my gridview and its binding on page load.
string username = System.Web.HttpContext.Current.User.Identity.Name;
string connection = @"Data Source=FNUILTP10\SQL2005;Initial Catalog=RecordsManagement;Integrated Security=True";
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(connection);
con.Open();
SqlCommand cmd = new SqlCommand("getOAs", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@OA",username));
SqlDataReader sqlReader = cmd.ExecuteReader();
//Object results;
// results = cmd.ExecuteScalar();
// txtname.text = results.ToString();
//ddcollege.DataSource = sqlReader;
if (sqlReader.HasRows)
{
sqlReader.Read();
lblname.Text = sqlReader.GetValue(0).ToString();
gvunclassified.DataSource = DataBase1.getfileRecords(username);
DataTable dataTable = gvunclassified.DataSource as DataTable;
if (dataTable != null)
{
DataView dataView = new DataView(dataTable);
//dataView.Sort = GetSortExpression(e.SortExpression);
gvunclassified.DataSource = dataView;
gvunclassified.DataBind();
}
}
and gri<asp:GridView ID="gvunclassified" runat="server" AllowPaging="True"
AutoGenerateColumns="False" OnRowCommand="viewfiles" CellPadding="1" ForeColor="#333333"
GridLines="None" Height="190px" PageSize="5" style="margin-top: 21px; margin-left: 8px;"
Width="954px">
<alternatingrowstyle backcolor="White">
<columns>
<asp:BoundField DataField="File_Subject" HeaderText="File Subject"
SortExpression="File_Subject" />
<asp:BoundField DataField="File_Name" HeaderText="File Name"
SortExpression="File_Name" >
<itemstyle wrap="True">
<asp:BoundField DataField="UploadedOn" HeaderText="Uploaded On"
SortExpression="UploadedOn" />
<asp:ButtonField AccessibleHeaderText="View File" ButtonType="Button" CommandName="ViewFiles" ShowHeader="true"
HeaderText="View File" Text="View" />
<asp:BoundField DataField="Division/College" HeaderText="Division or College"
SortExpression="Division/College" />
<asp:TemplateField HeaderText="Department">
<itemtemplate>
<asp:DropDownList ID="DDept" runat="server"
DataSourceID="SqlDSDepartment" DataTextField="Dept_Name"
DataValueField="Dept_Name" OnSelectedIndexChanged="getddeptname" >
<asp:SqlDataSource ID="SqlDSDepartment" runat="server"
ConnectionString="<%$ ConnectionStrings:RecordsManagementConnectionString %>"
SelectCommand="SELECT DISTINCT [Dept_Name] FROM [Department]">
<asp:TemplateField HeaderText="Category">
<itemtemplate>
<asp:DropDownList ID="DDCategory" runat="server"
DataSourceID="SqlDSCategory"
DataValueField="
Member 9291223
14-Oct-12 22:14pm
View
also my e.CommandArgument always equals to 0.If the way im doing it is wrong then how else can i achieve it.
Member 9291223
14-Oct-12 20:16pm
View
Thanks but any hints on how to set the CommandArgument=row index...I tried to use
int indexx = Convert.ToInt32(e.CommandArgument);
GridViewRow rowx = gvunclassified.Rows[indexx];
int rowCount = Convert.ToInt32(rowx.Cells[5].Text);
but this doesnt work
Member 9291223
11-Oct-12 22:34pm
View
I have even tried doing it this way but still again teh first value remains selected:
if (Page.IsPostBack==true)
{
//int currentIndex = gvunclassified.EditIndex;
//gvunclassified.EditIndex = -1;
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = gvunclassified.Rows[index];
try
{
string value2 = ((DropDownList)row.FindControl("DDept")).SelectedItem.ToString();
}
catch
{
Response.Write("error");
}
}
Member 9291223
10-Oct-12 19:37pm
View
everything works fine,no errors or exceptions during run time.but its just that the mail neva reaches the in inbox...confussed
Member 9291223
10-Oct-12 17:34pm
View
Im quite sure that im using the correct host..My host "mail.fnu.local".If im not wrong then this is the way to put down the host right..
Member 9291223
10-Oct-12 17:25pm
View
thanks but even after doing this the mail is not delivered to my inbox...or may be im using a wrong smpthost
Member 9291223
7-Oct-12 22:24pm
View
Thanks
Member 9291223
2-Sep-12 23:47pm
View
But actually my document_Number is nvarchar(50).still i cnt figure it out as its not working
Member 9291223
30-Aug-12 17:30pm
View
Update is actual the update panel Id.The asp code is like this
<asp:UpdatePanel ID="update" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:Panel ID="errorsPanel" runat="server" Height="41px"
style="margin-left: 54px; margin-top: 144px" Width="812px" BackColor="White">
<div style="text-align: left">
<asp:ValidationSummary ID="valSummary" runat="server"
DisplayMode="BulletList" ShowSummary="true"
ValidationGroup="valGroup" />
<div style="text-align: right">
<asp:Button ID="okBtn" runat="server" Text="Ok" /></div>
</div>
<asp:Label ID="invisibleTarget" runat="server" Style="display: none" />
<asp:ModalPopupExtender ID="modalPopupEx" runat="server" PopupControlID="errorsPanel"
TargetControlID="invisibleTarget" CancelControlID="okBtn" BackgroundCssClass="modalBackground">
How can i make sure that its not null
Thanks
Member 9291223
29-Aug-12 23:59pm
View
Thanks for your effort but unfortunately i again got that error
Member 9291223
16-Aug-12 23:40pm
View
Doesnt a scanned document will alway have one page.That what i think so the page count remains @ 1 o some1 correct me if im wrong
Member 9291223
8-Aug-12 18:59pm
View
THis statement is a commented like:
cmdselect.Parameters["@OutRes"].Direction = ParameterDirection.Output;
Member 9291223
8-Aug-12 18:54pm
View
The stored procedure is like this:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[RecordManagement_getcollegeid]
@College nvarchar(max)
AS
Select College_ID
From College
WHERE College_Name = @College
Member 9291223
5-Aug-12 22:15pm
View
any sample could would be highly appreciable and it also needs to check if that directory does not exists then create one o other wise use the existing 1
Show More