|
|
You can make an exe and create a task that runs it a specific time of day. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi All,
I'm creating a web application in ASP.NET and c#. What I'm trying to do is create a vertical menu similar to the blue one in this link:
http://www.alistapart.com/articles/taminglists/
I've created these menus in the past but in just a plain HTML page not ASP.NET. When I try to apply the same format to the unorder list the look isn't the same so I was trying to create it using LinkButtons like so:
<span class="subMenuDiv">
<asp:LinkButton ID="link1" runat="server" CssClass="subMenu" Text="Case Info"></asp:LinkButton>
<asp:LinkButton ID="link2" runat="server" CssClass="subMenu" Text="Reportable Info"></asp:LinkButton>
</span>
The CSS looks like this:
.subMenuDiv
{
float: right;
width: 120px;
padding: 0 0 0 0;
border: none;
margin: 0;
}
.subMenu {
width: 100%;
margin: 0;
padding: 4px 10px 4px 10px;
text-decoration: none;
background-color: #CCCC99;
border: solid 1px black;
color: #666633;
text-align: left;
}
The problem I'm having is the border of the subMenu is showing up twice, i'm not sure why but I know the padding is linked to it.
How do I get it so the border only shows on the outer edge of the linkButtons (subMenu items) and so only one border is shown?
Any help would be great.
Thanks
|
|
|
|
|
You may get a better response by posting this in the correct forum, i.e ASP.NET[^]. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Thanks, I totally forgot about the ASP.NET message board. I've just posted it there now.
Thanks again.
|
|
|
|
|
At a guess, there is something goofy with how the ASP controls are being rendered. There really is no need to use them at all: find CSS and HTML code that worked in the past and use it instead.
|
|
|
|
|
This should be easy, but I'm getting a lot of noise when I try to search the web for an answer.
In summary: I create a new custom control that inherits directly from Control . I want to display the name assigned to it by the IDE, in the same way that a standard TextBox has its Text property set. I assume that I can do this in the control's constructor. How do I get this information?
|
|
|
|
|
TechBearSeattle wrote: I want to display the name assigned to it by the IDE
There will always be a name assigned to your control from IDE. Something like CustomControl1, CustomControl2 and so on.
As far as displaying is concerned, If it has a paint event, you need to implement drawing it. If you want to display it only during design time, you can do a test whether it is at design time.
|
|
|
|
|
Yes, but how do I get this name? The Name property returns an empty string, presumably because it has not been initialized yet. That's my question.
|
|
|
|
|
If you add your control through your code, you need to assign the name value yourself.
Name property is only initialized when you drag and drop the item from toolbar. Are you doing that?
|
|
|
|
|
One possibility could be to define your Name property in constructor. Using either GUID or have a global variable to keep a tab on next available name.
IDE doesn't assign a name when you are adding a control through your code.
|
|
|
|
|
In a normal world, others decide on a name, not the person or object itself. Because it is others who will use the name to refer to the person or object.
|
|
|
|
|
Now that is called an "Expert" Comment.
|
|
|
|
|
TechBearSeattle wrote: The Name property returns an empty string, presumably because it has not been initialized yet. That's my question
Correct. The control may not have a name immediately upon creation, or even at certain times in it's life. So, in your drawing code, you have to check for this and act appropriately.
BTW: The Name property is not mandatory. You can have instances of the control without a Name value being set at all. An example of such would be a dynamically created control instance in your consumers code.
|
|
|
|
|
Visual Studio Designer uses Control.Name to store the name of the variable holding the reference to said Control; it does so for all kinds of Controls and Control derivatives.
If you use another way of adding a Control, its Name will default to an empty string; if you want it to have a name, you should take care of that right after the instantiation.
|
|
|
|
|
Maybe if I described what I'm doing, my question will make more sense
I am working on a custom tab control that implements custom tab pages. These are both derived from Control and are just as much a learning trial as an effort to make something useful. As far as possible, I would like to duplicate the effect of Microsoft's standard tab control. When I drop TabControl on a form, I get two tabs, TabPage1 and TabPage2. A second TabControl gives TabPage3 and TabPage4.
In the constructor of NewTabControl , I am trying to do this:
Dim P1 As New NewTabPage
Dim P2 As New NewTabPage
pTabPages = New NewTabPageCollection(P1, P2)
P1.Text = P1.Name
P2.Text = P2.Name
This is adding the two pages. What I want is for the tab captions to show the page names. However, the Name properties hold empty strings. I would like to populate those values.
On a possibly related note, I notice in the Form.Designer code that the MS TabControl generates the code for the MS TabPage s explicitly along with the code for the TabControl , while the generated code for NewTabControl defines only NewTabControl1. Is my solution to generate designer code for the NewTabPage objects and, if so, how?
|
|
|
|
|
Hi,
The few lines below is basically what I'm trying to do:
Dim sPerm As New SocketPermission(NetworkAccess.Connect, TransportType.Tcp, "207.46.232.182", 80)
sPerm.PermitOnly()
Dim ePoint As New IPEndPoint(IPAddress.Parse("207.46.232.182"), 80)
Dim s As New Socket(ePoint.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
s.Connect(ePoint)
MsgBox("Connected:" + s.Connected.ToString)
s.Close()
Can anyone tell me why is the System.Net.SocketPermission implementation so miserable? I could only get sPerm.Deny() to work, but then it won't work on wild card IP addresses!!
|
|
|
|
|
Hey,
I'm trying to create a Windows Service in C++ Dot Net. I've got Visual Studio 2008 Pro Edition on Server 2008.
I'm trying to create a Windows Service using this procedure:
http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx
However when I get to the Step 2.3 the Project Output Dialog is blank
(as seen in this screen shot http://imagebin.ca/view/wtjiwJ7z.html )
I feel like I need to get the output right for this application to work. What should I do?
I admit that I'm a noob to Visual Studio
x-posted on Tech Republic and Tech Support Forum
|
|
|
|
|
Hi,
you didn't add the project of the windows service you've created to the solution. Do this by clicking the solution icon in the solution explorer and select "Add Existing project". Thi should fill the combobox.
Regards
Sebastian
|
|
|
|
|
Sebastian,
Wow I think this will work!! Thanks!!
|
|
|
|
|
|
No one is going to read this unformatted garbage. Fix the formatting and only post what is necessary, not all of the code in your app. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Since you don't like the way it's posted fix your dam editor I used the code block to insert.
bye will not re post will ask on MSBN
|
|
|
|
|
You do know that it's not his editor don't you?"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
|
|
|
|
|
Yes I know its not his editor but he told me several thing such as to not post as much code well ok I won't post any Because without the code that I am using how can he tell where the problem is. I did not post anymore code than I thought was necessary all it contained was the datagridview and the print set up routine. If he did not need that then he should be able to answer the question without the code at all. But I was not thinking of him when I posted it. I was thinking of the beginners that try to follow what is going on, with out the code their lost.
Besides what portion am I supposed to post. The whole thing is interlaced with setup calls. This is a problem that is caused by logic not caused by something that is just not getting the data. To troubleshoot logic you have to have the code.
|
|
|
|