|
Good Morning,
When my application opens, it checks a version number from an online database to determine if it is using the most current version available. If not, I need it to be able to download the most current version from an online server and then install the application update automatically. I know we see examples of this every day, such as security updates in Windows or online checks for anti-virus programs. The check and automatically close if not installed are already working fine and return a Boolean. How do I force and install the download?
Thank You, Pat
|
|
|
|
|
|
Thank for your answer. I have marked it as correct for this issue. I was able to use it to get the string of code that I needed to resolve the download problem. Now, I need to be able to find a way to automatically install the download. Best Regards, Pat
|
|
|
|
|
Hi all,
I have a NOOB question, when developing a custom user control how can you reference other classes or use a partial class? For some reason when I try to reference another class it can not find it. I tried using the same namespace in the separate class file and tried putting it in the bin directory without any luck. Thanks for the Help!
-Andy
|
|
|
|
|
If the class is in another assembly you must remember to add a reference before it will be available.
Perhaps if you showed a bit of the code we could evaluate it. And don't forget to format the code using the pre tags. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks Mark, I was hoping it was something simple, sometimes the easiest things give you the most problems, here is a layout of my code....
myControls.ascx.cs:
namespace myControls
{
public partial class MyUserControl : System.Web.UI.UserControl
{
public MyEnum myEnum;
protected void Page_Load(object sender, EventArgs e)
{
(.......)
}
}
}
myControls.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="myControls.ascx.cs" Inherits="myControls.MyUserControl" %>
<div>
</div>
myControls.Support.cs
namespace myControls
{
public enum MyEnum
{
Day,
Week,
Month,
}
} Thanks again,
Andy
|
|
|
|
|
You need to include the namespace of that class in your project (if it is under a different namespace).
For e.g.
using System;<br />
using System.input;<br />
using myNamespace;
OR
alternately you could just try
new myNamespace.myClass() .Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Abhinav,
I tried referencing the namespace but the main problem is the User Control can not find the separate class file. Everything works right when I include the Enum in the same file but when I try to use it it gives me errors that it can not find the assembly or reference.
Thanks
Andy
|
|
|
|
|
I saw your code (pasted above).
See a note here[^].
"The partial modifier is not available on delegate or enumeration declarations."Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
modified on Wednesday, February 10, 2010 10:09 AM
|
|
|
|
|
I don't fully understand your query - but are you just missing a project reference? As in solution exporer, project, references -> add reference? Regards,
Rob Philpott.
|
|
|
|
|
Rob,
All of these files are in the same Project I have a UserControl and a class in a separate file but the UserControl can not find the class. I tried putting all of these in the same namespace and tried to use the namespace (using myNamespace.UserControl) without any luck. I'm sure it is a simple fix but I am new to C#. It's not as easy as including a C/C++ header file.
-Andy
|
|
|
|
|
So (for my clarity) - you have a single project file which consists of various source files. Your custom control comprises just another set of source files in this project? What do you mean 'in a seperate file'?
I'm afraid I'm completely lost, but if it is just a namespace issue, get Visual Studio to resolve the namespace by doing a context menu on the type where the error arises and doing 'resolve namespace' (or something like that).Regards,
Rob Philpott.
|
|
|
|
|
Rob,
Sorry for not being very clear....
In my project I have:
myUserControl.ascx
|->myUserControl.ascx.cs
myUserControlSupport.cs
myUserControlSupport.cs Contians Enum that I want to use in myUserControl but myUserControl does not see it and I am lost on how to reference it. I have the same namespace and a partial class defined but it still does not see it.
Thanks for the Help!
-Andy
|
|
|
|
|
And just to make things even more clear ( ).. You get a compilation error, so it is not a matter of the Intellisense not keeping up with you and your classes?
|
|
|
|
|
Yes that is correct, I was getting Errors when I tried to compile.
-Andy
|
|
|
|
|
Well, that should work. Dunno. The enum is publically visible? Regards,
Rob Philpott.
|
|
|
|
|
Got it... Looks like VS was not seeing the other code behind, not sure why not but everything seems to be working right now. Has anyone else had problems like this with VS?
Thanks again for your help everyone
-Andy
|
|
|
|
|
|
You will probably get a better response in the WPF forum. If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
mmm, I see why you say that, however, it's all code behind stuff and loading the listbox itself is not really using WPF as such. V.
|
|
|
|
|
Since we're getting so intolerant lately (the question was clearly not 100% related to WPF) I'll just delete it. V.
|
|
|
|
|
|
I can reply the same thing to people voting me down: How to answer a question.[^]
It's not 100% correct to delete the message, but I did so in order to avoid discussion.
Apologies if it really is that wrong to do so.V.
|
|
|
|
|
How does this apply? The ones who marked you down were following the guidelines. You were not.
3. If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
4. If the question is inappropriate then click the 'vote to remove message' button I know the language. I've read a book. - _Madmatt
|
|
|
|
|
exactly, my question was certainly not poorly phrased, not inappropriate, no bad english. I certainly believed it belonged in the C# forum as it was IMO not 100% related to WPF and I was developing in C#.
There was no reason for voting me down, hence my reply to you.
Secondly, I apologized for removing the message, let's just stop the discussion and forget about it.V.
|
|
|
|