|
You can view it using this[^] Tool.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi everybody. Please I want to develop any type of website using the .NET Framework. I have the software installed on my notebook. Thanks and hope to receive a feedback sooner.
|
|
|
|
|
This[^] would be the best place to start.
It's time for a new signature.
|
|
|
|
|
Sean has done a very good job by compiling all the good resources for web development together.
So, check it out: Beginner's Walk - Web Development[^]
I am sure, it will help you.
..Go Green..
|
|
|
|
|
Following is the best link to get started with Asp.NET.
Get Started[^]
It covers following points.
1. What is ASP.NET?
2. Download ASP.NET and Visual Studio Express Tools (FREE)
3. Build your First ASP.NET Web Application
4. Follow a Step-By-Step ASP.NET Tutorial
5. Learn More about ASP.NET
6. Host your ASP.NET Web sites on the Web
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I have the task of deserializing objects from a binary formatter that were serialized using VB.Net's binary formatter. The ONLY issue I have come across is that the original class had a field, the same name as the class
structure MyName
...
dim MyName as String
end structure
In VB, this was apparently find, but in C#, I cannot write the class this way. I've rewritten it so that
struct MyName
{
...
string myName
}
but now the deserialization fails (because, I assume, the field name has changed). I have ONLY changed the name of the attribute. I guess this is enough to throw off the deserialization.
Is there away that I can fix this dynamically, or should I resort to the binary reader and parsing the binary file manually?
Thank you for any considerations you could throw my way.
Dave
|
|
|
|
|
I'm not sure it can be solved at all, but if it does, it probably will be based on SerializationBinder . Start Googling!
|
|
|
|
|
hi,
it might help using Attributes for Serialization like i.e.:
<br />
struct MyName<br />
{<br />
[XmlElement("MyName")]<br />
string myName;<br />
}<br />
|
|
|
|
|
Go back and read the OP again. He's using binary formatter, not XML.
|
|
|
|
|
ups my fault ^^
|
|
|
|
|
Hi guys, has anyone come across any scenario wherein you needed to merge one object with another object of same type, merging the complete object graph.
for e.g. If i have a person object and one person object is having first name and other the last name, some way to merge both the objects into a single object.
public class Person
{
public Int32 Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class MyClass
{
Person obj1 = new Person(); obj1.Id=1; obj1.FirstName = "Tiju";
Person obj2 = new Person(); ojb2.Id=1; obj2.LastName = "John";
obj1.MergeObject(obj2);
obj1.Id
obj1.FirstName
obj1.LastName
}
I had come across such type of requirement and I wrote an extension method to do the same.
public static class ExtensionMethods
{
private const string Key = "Id";
public static IList MergeList(this IList source, IList target)
{
Dictionary<string, object> itemData = new Dictionary<string, object>();
string temp = null;
foreach (object item in source)
{
temp = GetKeyOfRecord(item);
if (!String.IsNullOrEmpty(temp))
itemData[temp] = item;
}
foreach (object item in target)
{
temp = GetKeyOfRecord(item);
if (!String.IsNullOrEmpty(temp) && itemData.ContainsKey(temp))
itemData[temp].MergeObject(item);
else
source.Add(item);
}
return source;
}
private static string GetKeyOfRecord(object o)
{
string keyValue = null;
Type pointType = o.GetType();
if (pointType != null)
foreach (PropertyInfo propertyItem in pointType.GetProperties())
{
if (propertyItem.Name == Key)
{ keyValue = (string)propertyItem.GetValue(o, null); }
}
return keyValue;
}
public static object MergeObject(this object source, object target)
{
if (source != null && target != null)
{
Type typeSource = source.GetType();
Type typeTarget = target.GetType();
if (typeSource != null && typeTarget != null && typeSource.FullName == typeTarget.FullName)
if (typeSource.IsClass && !typeSource.Namespace.Equals("System", StringComparison.InvariantCulture))
{
PropertyInfo[] propertyList = typeSource.GetProperties();
for (int index = 0; index < propertyList.Length; index++)
{
Type tempPropertySourceValueType = null;
object tempPropertySourceValue = null;
Type tempPropertyTargetValueType = null;
object tempPropertyTargetValue = null;
if (propertyList[index].GetIndexParameters().Length == 0)
{
tempPropertySourceValue = propertyList[index].GetValue(source, null);
tempPropertyTargetValue = propertyList[index].GetValue(target, null);
}
if (tempPropertySourceValue != null)
tempPropertySourceValueType = tempPropertySourceValue.GetType();
if (tempPropertyTargetValue != null)
tempPropertyTargetValueType = tempPropertyTargetValue.GetType();
IList ilistSource = tempPropertySourceValue as IList;
IList ilistTarget = tempPropertyTargetValue as IList;
if (ilistSource != null || ilistTarget != null)
{
if (ilistSource != null)
ilistSource.MergeList(ilistTarget);
else
propertyList[index].SetValue(source, ilistTarget, null);
}
else if (tempPropertySourceValue != null || tempPropertyTargetValue != null)
{
if (tempPropertySourceValue != null)
tempPropertySourceValue.MergeObject(tempPropertyTargetValue);
else
propertyList[index].SetValue(source, tempPropertyTargetValue, null);
}
}
}
}
return source;
}
}
However, this works when the source property is null, if target has it, it will copy that to source.
IT can still be improved to merge when inconsistencies are there e.g. if FirstName="Tiju" and FirstName="John"
Any commments appreciated.
Thanks
TJ
|
|
|
|
|
Hi,
How does .net framework automatic updates?
Does windows update actually checks/updates .net framework or any .net application actually check any checks/updates?
I have .net application hosted via click once. On certain sites, the application is using lots of bandwidths (I guess it might checks for any updates!).
Thanks,
Divyesh
|
|
|
|
|
divyesh1432 wrote: How does .net framework automatic updates?
If configured, Windows Update will do the framework updates for you.
My signature "sucks" today
|
|
|
|
|
divyesh1432 wrote: I have .net application hosted via click once. On certain sites, the application is using lots of bandwidths (I guess it might checks for any updates!).
Unless you specifically programmed your application to check for updates this is very unlikely to be the cause of the high bandwidth. Also, as far as I know, the .NET Framework is incapable of checking for updates. Windows itself does the checking.
So any high bandwidth usage in your application is due to the way it has been coded.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec.
Business Myths of the Geek #4 'What you think matters.'
|
|
|
|
|
Are you talking about the updates of your application, or the .NET updates?
If it's the application, ClickOnce increments version numbers and they can pile up in the ".\ProjectName\publish\Application Files" folder. As the user can only roll-back one level you should make sure only the latest version and the one previous one are in that folder.
|
|
|
|
|
I am talking about .net framework updates!
And one question about click once, it shows me one year validity of the license when you publish your application. After one year I think we need to create another certificate. In that case how can we publish new version. Is there any licensing policy with microsoft that can extend the expiry of that certificate?
Thanks,
Divyesh
|
|
|
|
|
Hi guys,
I have a problem with autoscrolling of the .NET ScrollableControl. I am using TabPage which inherited from ScrollableControl in the class hierarachy. Every TabPage object has only 1 UserControl derived control which draws the landscape; there is no other control on the tabpage.
The usage of my application is its user will drag a file from windows explorer and drop into the TabPage. As more files are dragged and dropped, the UserControl derived control will expand to accomodate the drawing of the files and auto-scrolling will be enabled.
The problem I have is when I mouse-click on the UserControl control, the vertical and horizontal scrollbars will scroll back to (0,0) position. I want the vertical and horizontal scrollbars to remain at their original scrolled position whatever happens. I believe when I mouse-click on the UserControl control, the UserControl control comes into focus and that triggers the auto-scrolling to (0,0) position.
Please help.
Thanks in advance!
|
|
|
|
|
|
Hi Adam,
Thank you for looking up the link for me!
It does not help for me: When it briefly scrolls back to the zero position and scrolls back to the original position, I got disoriented where I was in the user-control. I'll look for another solution.
Thanks again!
Have a nice day!
|
|
|
|
|
The code below takes a few seconds for each thread/webpage, which is longer than accessing it from an open browser such as google chrome. Is there some setting I need to apply to make it run faster? Should I try to reuse the same webclient in each thread and consider using DownloadAsync? I am thinking that webclient might internally use technology from the slow browser internet explorer instead of google chrome for instance. Is there a public API that would let me download this with google chrome.
System::Net::WebClient client;
client.DownloadString(URL); //URL is a System::String^
|
|
|
|
|
Ted2102 wrote: which is longer than accessing it from an open browser such as google chrome.
That's an unfair comparison; the piece of code will always fetch the page as it is on the server, where Chrome can simply read back it's own cache.
Ted2102 wrote: consider using DownloadAsync?
That wouldn't fetch the page faster, it would only move the task to another thread. You'd still have to wait until that thread receives the entire response.
Ted2102 wrote: Is there a public API that would let me download this with google chrome.
Alas, no.
I are Troll
|
|
|
|
|
|
I recently posted this thread: http://www.codeproject.com/Messages/3498627/How-to-hide-Data-Directory-in-VB-2-0.aspx[^]
something in the reply quite caught my attention: If Ms Word is not running on a database then what would be the best practice for software developers aiming for the sky?
I could easily be classified as a 'master of databases'; I intentionally learnt this over the last 10 years, assuming all along that best software must run on best databases. Is there something i need to learn on how best software are made. this has triggered my thoughts on some two features that did not impress me on vs 2005: that 1) you can't hide/lock access 2003 from users when distributed, and 2) when i use sql 2005, users have to install sql server/express, and the database will be in the server, so sa can easily browse it!!
|
|
|
|
|
cyberexel wrote: I intentionally learnt this over the last 10 years, assuming all along that best software must run on best databases.
Wrong. The best software doesn't mean it's using the best database. Not all software uses a database engine.
cyberexel wrote: 1) you can't hide/lock access 2003 from users when distributed
That's Access' fault, not Visual Studio's. The Jet database engine (what Access uses) was not designed to be the top-of-the-line, be all-end all, database engine. It's a simple desktop database geared toward small data requirements.
cyberexel wrote: 2) when i use sql 2005, users have to install sql server/express, and the database will be in the server, so sa can easily browse it!!
Yes, the "sa" account is the "God Rights" account of the SQL Server. It has access to everything, and for a reason.
If your every day users have the password to the "sa" account, that's your fault, not theirs. If you're using the "sa" account from your application in the connection string, that's also your fault. It's your job as the developer to understand the security model of SQL Server and setup users and permissions as appropriate to give those users just the access they need to manipulte the data in the database according to the business rules and nothing more.
|
|
|
|
|
cyberexel wrote: sa can easily browse it
Not if it doesn't exist or no one knows the password.
|
|
|
|