|
Sorry - but no one knows what your question is all about.
My signature "sucks" today
|
|
|
|
|
Your problem is you forgot to comment out sams account name.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Some body know how to build a binary tree for mlm company in asp.net
|
|
|
|
|
Does "mlm" mean Multi-Level Marketing? What is it about the company that you are trying to represent? Doesn't that require more than 2 branches at each level to be a profitable scam?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
The same way I'd write a Binary tree for any other type of ASP.NET application; only the data would change.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
MLM Companies present their CUSTOMER HIERARCHY with a Horizontal Tree like Binary Tree ( 2 legs ), Sponsor Tree ( multiple Legs ), POOL Tree ( 3 or 4 legs)
Normal Tree Controls are vertical But you can build it Using COMPOSITE Control and Define your Legs / Levels at design time on your page.
Below is a Code Snippet to make you some idea about it.
<br />
namespace MLMTreeCntrol<br />
{<br />
<br />
<br />
public class templatedTree : System.Web.UI.WebControls.CompositeControl, INamingContainer<br />
{<br />
private ITemplate messageTemplate = null;<br />
private ITemplate TreeNode = null;<br />
private int _MaxLevel = 1;<br />
private int _Branch = 2;<br />
<br />
public int StartLevel<br />
{<br />
get<br />
{<br />
return (int)ViewState["_StartLevel"];<br />
}<br />
set<br />
{<br />
ViewState["_StartLevel"] = value;<br />
<br />
}<br />
}<br />
<br />
public int MaxLevel<br />
{<br />
get<br />
{<br />
return _MaxLevel;<br />
}<br />
set<br />
{<br />
_MaxLevel = value;<br />
}<br />
}<br />
<br />
public int Branch<br />
{<br />
get<br />
{<br />
return _Branch;<br />
}<br />
set<br />
{<br />
_Branch = value;<br />
}<br />
}<br />
<br />
[TemplateContainer(typeof(MessageContainer))]<br />
[PersistenceMode(PersistenceMode.InnerProperty)]<br />
public ITemplate MessageTemplate<br />
{<br />
get<br />
{<br />
return messageTemplate;<br />
}<br />
set<br />
{<br />
messageTemplate = value;<br />
}<br />
}<br />
<br />
<br />
[TemplateContainer(typeof(MessageContainer))]<br />
[PersistenceMode(PersistenceMode.InnerProperty)]<br />
public ITemplate Node<br />
{<br />
get<br />
{<br />
return TreeNode;<br />
}<br />
set<br />
{<br />
TreeNode = value;<br />
}<br />
}<br />
<br />
public delegate void NodeHandler(object sender, CommandEventArgs e, MessageContainer s);<br />
public event NodeHandler ItemCommandA;<br />
<br />
protected override bool OnBubbleEvent(object sender, EventArgs e)<br />
{<br />
ItemCommandA(this, (CommandEventArgs)e, ((Control)sender).NamingContainer as MessageContainer);<br />
CommandEventArgs C = (CommandEventArgs)e;<br />
return true;<br />
}<br />
<br />
<br />
protected override void CreateChildControls()<br />
{<br />
if (ViewState["_StartLevel"] == null)<br />
{<br />
ViewState["_StartLevel"] = 1;<br />
}<br />
this.Controls.Clear();<br />
if (messageTemplate != null)<br />
{<br />
makeTree((int)ViewState["_StartLevel"], this, 1);<br />
}<br />
}<br />
<br />
public override void DataBind()<br />
{<br />
CreateChildControls();<br />
<br />
this.ChildControlsCreated = true;<br />
<br />
base.DataBind();
}<br />
<br />
<br />
<br />
private void makeTree(int i, Control ctrl, int level)<br />
{<br />
if (level <= MaxLevel)<br />
{<br />
ctrl.Controls.Add(new LiteralControl("<table border=1><tr><td colspan=" + _Branch + " align=center>"));<br />
MessageContainer container = new MessageContainer(i, "r");<br />
messageTemplate.InstantiateIn(container);<br />
ctrl.Controls.Add(container);<br />
<br />
ctrl.Controls.Add(new LiteralControl("</td></tr><tr>"));<br />
<br />
for (int j = 1; j <= _Branch; j++)<br />
{<br />
ctrl.Controls.Add(new LiteralControl("<td align=center>" + i));<br />
makeTree(i + j, ctrl, level + 1);<br />
ctrl.Controls.Add(new LiteralControl("</td>"));<br />
}<br />
<br />
<br />
ctrl.Controls.Add(new LiteralControl("</tr></table>"));<br />
}<br />
}<br />
<br />
<br />
public class MessageContainer: Control, INamingContainer<br />
{<br />
private int m_index;<br />
private Object node;<br />
<br />
private String m_message;<br />
internal MessageContainer(int index, Object Cnode)<br />
{<br />
m_index = index;<br />
node = Cnode;<br />
<br />
}<br />
public int Index<br />
{<br />
get<br />
{<br />
return m_index;<br />
}<br />
}<br />
<br />
public Object NodeVal<br />
{<br />
get<br />
{<br />
return node;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
<br />
hope this helps
cheers
Believes in betterment not the Best
|
|
|
|
|
We have a 3.5 application and are planning on supporting 4.0 in the near future and were wondering if we should just tell our support to only install the 4.0 framework now. The question really is, will a 3.5 application work, with no changes with only the 4.0 framework installed?
Randar Puust
Software Architect, Jonas Software
MCSD.Net, MCSE
|
|
|
|
|
Yes, definitely.
Dotnet Framework 4.0 provides backward compatibility.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
really? that is not how I understand it. Unfortunately I can't test it easily right now.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Jinal Desai - LIVE wrote: Dotnet Framework 4.0 provides backward compatibility.
In that case it should include 3.5, either within itself or by auto install.
It's time for a new signature.
|
|
|
|
|
Just change the target framework in your application (3.5 Framework one) and test it once. If everything goes fine then you can go ahead with only 4.0 on the computer.
|
|
|
|
|
If you are creating an installer with the .NET Framework specifications/requirements, it will compel the user to install the version you have specified even if the user has a newer version.
|
|
|
|
|
I've tested this and it seems that any solution/project created under 3.5 and opened in 4.0 requires conversion - it automatically brings up a conversion wizard. Creating new projects under 4.0 gives the choice of frameworks 2.0, 3.0, 3.5 or 4.
|
|
|
|
|
yes, the project files for different Studio versions have different content; this is independent of the .NET version that is being targeted by the project. So VS2010 can create a project that targets .NET 2.0, and said project will result in an exe/dll that runs fine on a 2.0-only system, but the project itself won't open in VS2005.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I have Visual Studio 2003 and 2005 installed in my system. I need to work on old project which is in 2003, but I am unable to open the project in Visual Studio. While trying to open I'm getting the following error message:
<br />
"Visual Studio.Net cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .Net setup and add the Web Development component"<br />
I have done the following for resolution, but same scenario is repeating.
1. I have created the virtual directory and configured it properly.
2.Open VS.NET 2003 command prompt and run aspnet_regiis.exe -i for registering which in .Net Framework version folder
3. I tried to delete the project and add it again.
I have installed .net 2005 first and then 2003. Is this may be the cause for the error? If so, should I uninstall all of .net 2.0 version and then check? Or should I need to change something in solution file?
Please advice what to do. Please help.
Thanks
meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
All relevant facts are gathered in this little article[^]. The most important one is: Visual Studio 2003 is the only version that can target .NET 1.1; and of course it needs 1.1 to be installed.
You can probably open the 1.1 solution or project with Visual Studio 2005, but then:
1. that one can't create a 1.1 executable (it only targets 2.0, and requires 2.0);
2. it will convert your project files, so they will no longer open in VS2003.
Conclusion: If you need to target 1.1, use VS2003 and your original set of project files.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Thank you for the reply and related article.
I am opening .Net 1.1 only, not in Visual Studio 2005. While trying to open .Net 1.1 projects, I right-click and select Visual Studio 2003. I am getting this error while trying to open the solution file of 1.1 version in the IDE of Visual Studio 2003.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
I can't help you then; I don't remember ever having seen such error, and I stopped using 1.1 and VS2003 long ago.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I think old style web site projects used FrontPage extensions to do some stuff. If you don't have that running on your server it may not be able to find the site.
|
|
|
|
|
How the memory is allocated in heap for a dynamically growing List.
while creating a new object the number of bytes required for that type is allocated in heap. How this is working if that class has a dynamic list???
My small attempt...
|
|
|
|
|
|
a List does not store its items, all it stores are references to those items. Basically it stores them in an array. When the array gets full, a new array is allocated, twice the size, and its content (the references!) is copied to the new array.
Objects never grow. They have a fixed size in memory. Assuming Car and Wheel are classes, when a Car object has four Wheel objects, it holds 4 references to those Wheel instances, which are separate objects. If Wheel where a struct (hence a value type, not a reference type), the Car would hold memory to store 4 Wheel instances all the time, whether you initialize them or not.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
It is like a linked list(not really.. but for the memory allocation part). It can have any number of items while memory is free. It is like using malloc function
|
|
|
|
|
pranav95 wrote: It is like a linked list
Not at all. A linked list would consist of individual items, each holding one or two pointers to its logical neighbors, and would imply: a separate memory block for each item, no overall memory requirement (except maybe for a head node and a tail node), and certainly no memory requirement larger than the item size itself. A .NET collection is based on an array, most additions do not require any memory requirement at all, and the array's capacity grows by doubling it, which may cause it to become located in the "large object heap" and may even cause fragmentation and out-of-memory situations one would not have with a linked list; OTOH being array-based has advantages, e.g. it allows for an O(1) indexing.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
according to my current knowledge in .net memory management the value types are stored in stack and reference types are stored in managed heap.
Form this, its clear that the object of a class will be saved in heap. Then where will be the memory allocated for the value type member of that class??
My small attempt...
|
|
|
|