|
Ranger49 wrote: I mean to create a new instance of a class you make a method with the same name as the class right?
Correct. That method (the constructor) is never specified with a return type. You're attempting to define a constructor for Project that returns a Matrix .
I recommend renaming the method to CreateMatrix() or something similar.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: Correct. That method (the constructor) is never specified with a return type. You're attempting to define a constructor for Project that returns a Matrix.
I recommend renaming the method to CreateMatrix() or something similar.
I thought that could be the reason.
Thanks, I will try that!
Ranger...
|
|
|
|
|
Ranger49 wrote: I recommend renaming the method to CreateMatrix() or something similar.
I tried your suggestion and it works now!
Thank you.
Ranger...
Beginner
|
|
|
|
|
After moving this method from its own class to the Matrix class, I then made a second Matrix instance method which uses as input the arguments of the former 'CreateMatrix' method, and this works too! I find it nice to have only one method to call for new and with its own arguments.
I find C# very interesting. And I am thanking you Ravi for your assistance.
Ranger...
Beginner.
|
|
|
|
|
Glad you got it to work!
/ravi
|
|
|
|
|
Hi all,
Greetings. I've generated dynamic link button in GridView Column. When i clicks on the link button,there is no click event takes place. instead the link button disappears. Can any one of you Give me the soultion for this issue.
Thanks in Advance
Babu
|
|
|
|
|
Hello
How can I get the Process that uses a particular file?
I realy can't get this!
Thanks for input
Joel
|
|
|
|
|
Hello Joel,
I don't think there is a way to find that out.
I have the same problem right now in my application.
But I found out, that I have to be carefull by starting Processes in my Application.
Maybe if you discribe your aplication and your problem, we could find a solution.
All the best,
Martin
|
|
|
|
|
I have never seen a path from a file (or some other resource) to its current holder.
And that is unfortunate, I know those annoying "cant do that, file is in use" messages.
One way to maybe find the problem is in using some utility (e.g. TaskInfo) that
is able to list the files and the handles for any single process.
Luc Pattyn
|
|
|
|
|
Thanks for the answers you two!
Especially for the name of that program!
I already doubted if it'd be possible to get the information anyway.
But now that I know it is, I'd wonder how this program does this?
I'd be very thankful only for an approach how to code a routine that gets this information.
Thanks in advance
Joel
|
|
|
|
|
i don't know what all a web service can do, I know it can return data via XML but i am wondering if I can create a logon and encrypt a zip file for download? or would this just be better to create an ASP page to do this?
Thanks
|
|
|
|
|
A web service can provide any service you desire. The convention is to exchange data via SOAP.
/ravi
|
|
|
|
|
Hi everybody
I have used a datagrid in my form. and every thing is Ok.
I can see the items I want in datagrid but the problem is about paging.
I have set the paging to 5 ..it means the datagrid should show 5 items in page 1 and the next 5 items in the next page( page 2 ) and ...
but it doesnt work ... it shows the page but when I click on page 2 it already shows the items in page 1 ...
I mean just page 1 works ...what should I do?
whats wrong with properties or code?
please tell me ...
thank you very much.
here is asection of my code :
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
FillDataGrid();
}
}
private void FillDataGrid()
{
cUpload upload=new cUpload();
bool Success;
dsUpload1=upload.GetAllUpload(out Success);
if(Success)
{
dgUpLoad.DataSource=dsUpload1.tblUpLoad;
}
dgUpLoad.DataBind();
}
|
|
|
|
|
You haven't handled the PageIndexChanged event.
DataGrid1.CurrentPageIndex = e.NewPageIndex
|
|
|
|
|
I need to open an Excel file that has been stored in the Access Database using the insert Object functionality of MSAccess manually.
What i am aware of is that i cant just read the field containing the Excel File into a Byte Array and pass it to the Excel object in C#,as the file is wrapped in the OLE Wrapper used by Access while inserting the file in database.
I have tried locating the Header of Excel file from the byte array and read the file from there on but it is not working.
Can some one please tell me as to how i can open the Excel File.
|
|
|
|
|
Hi people,
i removed my code from my code behind and placed them inline but have problem with the code bcos I don't know how to figure it out.
Using System;
Using System.Data.SqlClient;
.
.
.
but I am getting "INVALID TOKEN 'USING IN CLASS STRUCT, OR INTERFACE MEMBER DECLARATION"
please tell me how to fix it.
thak y a all
|
|
|
|
|
Change "Using" to "using".
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi they are all in smaller u and still gives the same problem.
|
|
|
|
|
You said you are using inline. Try it this way and see if this gets rid of your error
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.oledb" %>
<script runat="server">
Zach
|
|
|
|
|
I need to load an image from a url into a picturebox, but also know when/if the picture has successfully downloaded and been displayed before executing more code, since a large image over a slow connection will be far from instant. I am currently just setting the PictureBox.ImageLocation property to the url of the image, which works but seems to give no feedback on success. I looked at the Load() function but this seems to give no feedback either. Is there a good method I could use to accomplish this?
Thanks in advance.
|
|
|
|
|
You could download the image to a temp file, check the status of the download, then seed PictureBox .
/ravi
|
|
|
|
|
Assuming you're calling PictureBox.LoadAsync(string url) to load your image, the PictureBox throws an event called LoadCompleted when the picture is done downloading.
That should do what you want.
|
|
|
|
|
This is exactly what I was looking for, thanks a lot. I also discovered the LoadProgressChanged event so I can report the percentage done for the download, not just 'loading' or 'done'.
|
|
|
|
|
Hi Guys,
I always get stuck into thinking about the best way / most correct way of coding something.
I'm writting an application which uses a databasse.
One of table is used to store configuration information used (as example) by the configuration class/object.
Now at the moment, my database code including it's creation is all contained within a static class named Database.
My questions are:
1) Is having a static class for database routines a good idea? There is a potential for the application to be multi-threaded although each thread would most likely access different tables from the database.
2) Where is it best to code the rotine to load the configuration from the database?
I could have a method like Database.LoadConfig( Config config ) where an singleton instance of Config is passed to the Database --or-- I could have a method in the Config Class like Config.Load().
Any thoughts and comments appreciated.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Wayne Phipps wrote: 1) Is having a static class for database routines a good idea?
If you don't have too much interation with the database its fine. For larger applications you may wish to split up the interation into more logical divisions (maybe with a common base class)
Wayne Phipps wrote: There is a potential for the application to be multi-threaded although each thread would most likely access different tables from the database.
There are two ways I normally deal with a DAL. One is with the Enterprise Libraries. And the other is to do my own thing and for that the only shared information is a connection string that doesn't change. Each request to the database uses its own connection object (which is regarded as best practice) so there is no threading problems. If multiple things are accessing the database the database will handle it.
Wayne Phipps wrote: 2) Where is it best to code the rotine to load the configuration from the database?
I typically have a configuration class (a singleton class) that loads the information from the config file. All other code in the application can then access it.
If the configuration is large and complex I'll probably have a number of config classes to handle the various subsystems of the application. (Again, each will be a singleton - as all this is coming from a database, you may consider a common base for each of these an advantage)
|
|
|
|