problem with pop up object list with visual-studio-2008 - c#

I'm developing ASP.net project with C# using vs visual-studio-2008. when I drag drop asp control from tool box to the design view then I go to the code behind I should see the control in pop up object list. at the begin I had no problem but not when I drag and drop any new control I can not see it and even if I write it manually when give me an error this this name not exist.

A few things:
- Can you compile your code? Compilation errors often cause problems with intelli-sense
- Is your designer properly connected to the code behind?
- Try making a new WebForm to see if you have the same problems there
- Any DLL references that are broken?

Related

VS.Net2013 Designer removes custom controls instantiation

I have one project with my forms, etc. and one DLL-Project with UserControls and extended Controls, all with .Net4.5.1 and WinForms. A few weeks ago I did a migration from VS-Net2013 but the custom controls I'm talking about did not exist at that time. With every edit in my form inside Designer the new Form.Designer.cs is missing the instantiation of my custom gridview. All other parts regarding this control are still in the designer-code.
public class RichGridView : DataGridView { ... }
The missing part in Form.Designer.cs is:
this.dataDGV = new RichGridView(Definitions.DataType);
I can put this line back for myself into the designer-code but that's not how it should be. I was checking whether there are other files where VS might store information about the controls handled in its designer file but didn't found something. A while ago the designer has thrown away that line only a couple of times, so I could edit my form in the designer-window without problems and very seldom the instantiation was thrown away, now with every edit.
The other Project containing the DLL with my custom controls was compiled successfully and available for my Forms-Project, furthermore there was no change at all in the other project. If the point is that the custom control is outside the Forms-Project: I had to do this due to constraints in VS when dealing with UserControls regarding 32 vs 64 bit and debugging possibilities.
Not sure if there is some part of my code necessary for this question.

Visual Studio: Typing code vs. drag and drop from the control menu

I tried creating a gridview by typing code using another block of code on a different page as an example. I found that, when I ran the program and clicked the Edit button on a row, the fields did not change into textboxes for editing. I did have code to handle the Row Editing event.
In an earlier project I found that I had to double-click the Row Editing event in the Properties window for a gridview to create the event handling code. Typing in that code in the separate aspx.cs file did not work.
I am working with ASP.Net / C#.
What is going on with Visual Studio when I do drag and drop from the control menu as opposed to just typing in code? I am assuming it is adding something that I am missing when I am just typing.
Does anyone else have other examples that didn't work when they typed code that I should watch out for?
Even if you did a mighty good job copying the HTML, you likely still missed a few properties. That's because the GridView component comes with a bunch of so-called Design-Time properties that can (only) be configured from the Properties panel in Visual Studio.
I think you'll find that dragging a control from the toolbox onto your web form will set the control's design-time properties to a specific set of default values. This does not happen when you type the HTML by hand.

Composite Control has design time error in Certain Pages

I have a solution in ASP.Net 2008 (C#) with:
- A Project with a Composite control (with some buttons and textboxes).
- Another project (application) just to test the control.
I started to test the control inside a page or webform. It had some design time errors
so when I dragged the control to the page it showed the "Error Rendering Control" in design time. I corrected the errors, rebuild the project with the control,
and the control appears fine in design time.
But I added another webform, I dragged the control on it, and the "Error Rendering Control"
appears again. I added another webforms and drag the control on them and that error appears too.
Any help would be appreciated.
Sorry, because I have a lot of code in my composite control, I didn't noticed that I had a .FindControl sentence inside my composite control. I put that senrtence just for testing, but I forgot to delete it from my code.
So the page when it worked fine had the control specified in FindControl, the other pages
had not.

ILPlotPanel Component in UserControl

I'm having a problem trying to embed an ILPlotPanel inside a
UserControl which will be used as a COM Component, and will be imported by
a third part software.
I can put the ILPanel, but it don't render nothing (keeps the design mode visualization).
In another hand the ILPlotPanel gives me a error while trying do click and drag it (VS2010) to
a empty UserControl.
Here's the given error:
So the problems are:
1°. ILPanel don't render scenes while hosted by another application.
2º. In VS2010, can't click and drag the ILPlotPanel to a UserControl.
So anyone have a clue on this issues?
Thanks.
Try the ILNumerics.Settings.IsHosted property! You can set it via code (if your Host allows it early enough) or via configuration (by using the key ILNIsHosted).

creating Web User Control and adding it to tool box

I'm trying to learn how create a web user control so i can use in diffrent projects. I created a simple control just to see how it worked; after I created it, I could add it to any page on the current project and it worked fine.
My problem is how can I add this control to the tool box so I can use it in diffrent projects? I tried to look for him by doing:
right click toolbox > choose items > looking for it.
I can't see the control in the list.
What do i need to add so i can see it?
Here is the same question but nothing help me :( I'm using visual studio 2010.
Hey you have to create CustomControl instead of User Control
http://support.microsoft.com/kb/893667

Categories

Resources