
kingelessar
Avatar/Signature-
Posts
26 -
Joined
-
Last visited
kingelessar's Achievements
Newbie (1/14)
0
Reputation
-
Soon started following kingelessar
-
After some googling I found out that it is probably impossible what I am trying to do. Thanks for your help.
-
Thanks for your replies. I don't like the POST idea either, because when users would start entering their a custom url in their browser the session information would be lost. About the MAC address: when someone has a LAN, wouldn't I get the MAC address of the router? And how can I retrieve the MAC address? As far as I know ASP.NET doesn't provide any access to the actual TCP/IP package. The thing I am trying to do is track session information, and make this work in even a textbrowser, and allow the users to enter an url without the session info being lost. Dennis
-
Hey, I'm trying to create my own state/session management system because of the following reason: I want it to be cookieless and completely invisible to the end user (so no fiddling with the url), so the ASP.NET session thingy isn't good enough for me I could track sessions trough the client's IP, or a combination of the IP and UserAgent, but unfortunately there are a lot of people that have a home network with two computers with almost the same configuration. Does anyone have another idea?
-
I tried that. The problem is that the javascript value is an IXMLDOMDocument object, and I can't assign that to a input field. Dennis
-
Hey, I want to pass an IXMLDOMDocument object in javascript to serverside ASP.NET, and back. Does anyone know how I do this? Dennis
-
Ok michael_hk, I didn't understand completely what you wanted to do. About the temporary file, I don't think it is possible to pass the html directly to the webcontrol. Dennis ;)
-
I guess you have put all the projects into a so-called solution. You can add a reference in a project to another project in the same solution by right-clicking the project's references dir, click Add reference, and on the Project tab choose the project reference you want to add. Dennis
-
One thing you could do is filter out the html tags, so you are left with the text you want. You can do that by using the following regular expression: using System.Text.RegularExpressions; strHtml = "<b>some text</b>"; strHtml = Regex.Replace(strHtml,"<[^<>]+>",""); What the regular expression does, it searches for a <, then a random number of characters not < or > and then a >, so that represents a tag. It replaces the found string with "", so nothing, and filters out the html tags. I hope you understand me. Dennis ;)
-
Hey, cool it worked! I'm not sure what you mean with the ID of the node: do you mean the Index or the Text? To show any of these data in the menu, i would add an menu item once. Then before the menu is shown, it sets the text of that menu item to the ID of the node. menuItem3.Text = clickedNode.Index.ToString();or menuItem3.Text = clickedNode.Text; Dennis ;)
-
Hey, The problem is that the value of the variable n is lost after each page view. When I open the page the bush picture is shown because it is defined in the html. When I click the next button, the code converts the value of n to a string. But the value of n will always be 0 because it is forgotten after a page view. Then twice, the code adds 1 to the value of n. The result of that is 0 + 1 + 1 = 2, so the code always shows picture number 2. You follow me? ;) What you can do to solve the problem is to save the number in the label instead of the variable n. Hope that helps. Dennis
-
Make a textbox receive only numeric value...
kingelessar replied to Nick_Net2004's topic in Windows Forms
The way the website describes checks the user's input when the control leaves focus, and then gives an error message when the value is not a numeric value. When you want to limit the keys that can be used in a textbox (i.e. when the user presses the 'A' button nothing happens) you can use the TextBox's KeyPress event. Using the KeyChar property of the event's arguments you can check what key is pressed. When you don't want to block that key, you set the Handled property of the event's arguments to true to prevent the textbox handling the key. Note: Make sure you also allow keys like Backspace and Delete to be pressed, you can find their key codes by creating a new textbox, and in its KeyPress event you show the KeyChar in a MessageBox. That should work. Regards, Dennis ;) -
The workingarea in Windows is the part of the screen that is not occupied by the taskbar (the bar that is usually at the bottom of your screen with the start button). I want to create a sidebar that is always visible, and kinda eats off the workingarea. Dennis
-
Hey microkar, I tried and found it is very easy to do. I presume you know how to create a new ContextMenu. You can show a popup menu for a treenode as follows: subscribe to your TreeView's MouseDown event; in that event you first check whether the right mouse button was used; retrieve the node at the mouse location using the TreeView's GetNodeAt method; check if that node is a Null-reference, if so then it is no node that is clicked; show the contextmenu at the right location. The code i wrote for the event is as follows: private void treeView1_MouseUp(object sender,MouseEventArgs e) { if ( e.Button == MouseButtons.Right ) { TreeNode clickedNode = treeView1.GetNodeAt(e.X,e.Y); if ( clickedNode != null ) { treeMenu.Show(treeView1,new Point(e.X,e.Y)); } } } That should work OK! Tell me if you can get it working. That code shows the popup menu at the point where the user clicked. If you want to show the popup menu nicely under the node, you can change new Point(e.X,e.Y)into new Point(clickedNode.Bounds.Left,clickedNode.Bounds.Bottom) Dennis ;)
-
Hey, I was wondering if it is possible to change Windows' workingarea, i.e. the area of the screen that is not occupied by the taskbar. I am creating a program that docks at any edge of the screen, and I want to prevent windows from maximizing over or under the program. Anyone any ideas? Thanks in advance, Dennis ;)
-
OK, sorry for me being a bit hasty. I found a solution :) Take a look at this great article at: http://www.codeproject.com/csharp/DzCollectionEditor.asp Especially the CollectionEditor Howto. Dennis :D