Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi My visual studio does'nt work corectly
i cant add any control from my toolbox to the form.
i was repair it.
and the problem exist yet.
what do i do now?
also i was uninstall visual studio.
and again setting up it
but the problem exist yet.
Please help me.
cheers shahin.
Posted

I would say you're almost certainly not doing it right. Have you tried it across many projects ? Are you sure the files are not read only ? You select a control, then click the form to add it ?
 
Share this answer
 
1 - please don't push 'answer' to post a non answer
2 - what do you expect us to do ? How can I fix your computer ? Visual Studio works for everyone who uses it, so, I don't see how the problem can be anything but your install or, if you've removed and reinstalled the program, then the issue is one of the things I listed. We sure as hell cannot help you based on your vague posts.
 
Share this answer
 
just create a custom cortrol in c#
<pre lang="cs">using System.ComponentModel;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Samples.AspNet.CS.Controls
{
[
AspNetHostingPermission(SecurityAction.Demand,
Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.InheritanceDemand,
Level=AspNetHostingPermissionLevel.Minimal),
DefaultProperty(&quot;Text&quot;),
ToolboxData(&quot;&lt;{0}:WelcomeLabel runat=\&quot;server\&quot;&gt; &lt;/{0}:WelcomeLabel&gt;&quot;)
]
public class WelcomeLabel : WebControl
{
[
Bindable(true),
Category(&quot;Appearance&quot;),
DefaultValue(&quot;&quot;),
Description(&quot;The welcome message text.&quot;),
Localizable(true)
]
public virtual string Text
{
get
{
string s = (string)ViewState[&quot;Text&quot;];
return (s == null) ? String.Empty : s;
}
set
{
ViewState[&quot;Text&quot;] = value;
}
}

protected override void RenderContents(HtmlTextWriter writer)
{
writer.WriteEncodedText(Text);
if (Context != null)
{
string s = Context.User.Identity.Name;
if (s != null &amp;&amp; s != String.Empty)
{
string[] split = s.Split(&#39;\\&#39;);
int n = split.Length - 1;
if (split[n] != String.Empty)
{
writer.Write(&quot;, &quot;);
writer.Write(split[n]);
}
}
}
writer.Write(&quot;!&quot;);
}
}
}</pre>


then follow the folowing steps.

<b>•Create an ASP.NET server control.
•Add metadata to the control and its members to control security and design-time behavior.
•Use the App_Code directory in an ASP.NET Web site to test your control without manual compilation steps.
•Specify a tag prefix in a configuration file and in the control's assembly.
•Compile the control into an assembly and add it to the Bin directory.
•Embed a bitmap into the control's assembly as the toolbox icon for a visual designer.
•Use the compiled control in a page.</b>
 
Share this answer
 
Hi Shahin
one possible problem is that you did not make the forms Designe active
toolbox will not be available if you are activating the form1.cs
activate (i mean select the form designe and have the form1.cs disappear) then all the toolbox shall appear at the left side of your screen
cheer
khalid sabtan
saudia arabia
 
Share this answer
 
You're not holding your head at the right angle.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900