Hi, I have a similar problem. Did you solve this? In that case I would really appreciate your help. /M
Mattias Olgerfelt
Posts
-
C# WMI Connection -
How to find out when or who updated my Database.The most common way of doing this is to use triggers on the table you want to check for changes in, and then save date and username in an other table. You can also add two fields, last modifiedBy and lastModifiedTime to each table you want to check for changes in, in addition you add a trigger and copies these values to an other table eg: TableNameLog if the original table was named TableName. If you do not wan to use triggers you have to save the information in two places when a save occurs. You can use client-code or storede procedrues in the database. /M
-
C# Question with GenericsGenericStaticMethod .(args);
Does not work? /M -
How to add controls to OpenDialog box?Is this what you are looking for? this.regsiterStartupScript("tjoff", "window.open('url', '_blank');") /M
-
Connecting to a remote SQL Server in WinXP SP2How does the connection string looks like...? note that the SQL-server supports several instances and that that might be a peoblem if the instance nto is specified... /M
-
All character from column not getting! Any setting should i change?check the prameters for the procedure.. they has to be the same as for the table... /M
-
Unicode problemDont't use concated SQL... for this. Create a procedure and just add the value as paramter.. Also.. beaware of the collation... /M
-
T-SQL -
Architecture questionGo for the one-shot. It is more effective... Give up about the entity-objects... they are useful when the colexity is very high, else use the database for what the databse is effective and good about... /Mattias
-
CheckedListBox is not available in asp.netSorry... don't understand your question... try again... /M
-
Problem redesigning the CSS wayDavid O`Neil wrote: One thing I have noticed is that on your revision the corner jpg does not show up in Firefox, although I see Explorer presents yours very nicely. You can count with that IE is doing wrong and FF is correct... :sigh: /M
-
Problem redesigning the CSS wayDavid O`Neil wrote: One thing I have noticed is that on your revision the corner jpg does not show up in Firefox, although I see Explorer presents yours very nicely. You can count with that IE is doing wrong and FF is correct... :-( /M
-
Problem redesigning the CSS wayHi, again... corrected some small fuzzes... new version is downloadable... /M
-
Problem redesigning the CSS wayHi... There are some differences between your code and mine... Mine is general, you don't have to maintain a root-path. And it is a little easier to add events and styles to the elements in my code. About the page load, you don't need to worry; it is a lot faster then the web browsers are rendering the page. However… I have looked into making your page not using tables. Well it is possible but not with the exact look... There are differences between how tables (and table-cells) behaves and how div and span elements behave. Here are some of them. A table cell always fills out the rest of the cell if the table has a size and the rest of the cells have size. That is currently not possible using CSS. (Quite annoying actually). It is not possible to align a span or div between each other in the way cells are aligned to each other. A span or div does not change size like a table and cells changes size. So, if you want this very dynamic behavior of changing size you are stuck to table. However, I have made a little recoding of your page. You will find it here: http://www.olgerfelt.se/MonkeyCode/Monkey.zip[^] Note also that you have to replace the corner image to get the look you want. /Mattias
-
Javascript, Remote Window Close, Firefox and IEHi, this will work in IE... It is not a public standard so I don´t know how it works with FF.
var gRemoteWin function openWindow() { gRemoteWin = window.open("Test2.aspx", "remote"); timer = setTimeout("checkClosed()", 5000); } function checkClosed() { if (!gRemoteWin.closed) { alert('exists...' + gRemoteWin); timer = setTimeout("checkClosed()", 5000); } else { alert('does not exist ...'); } }
/M -
Problem redesigning the CSS wayDavid O`Neil wrote: That will only repeat the background IN THE AREAS WHERE TEXT APPEARS. For this reason it won't work if you want the header to automatically expand itself to the right edge of the page. (If your line of text is: "My Text", and it is displayed in 10pt, the background will only be about 1" in width, and will end right after the final 't'.) Well, that depends on what type of element you have... If you show me the code that is not working I will fix it for you... About the path to stuff... Aha, you want the the path to be relative but varying... Ok.. here is what i sugest... Add a container DIV to your page holding the menu. Create a Javascritpt function that crates the meny... Load the script in the page tag (onLoad="buildMenu();") Something like this...
.menuItem { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #FFF; border: #CCF; border: none; margin: 1px;} .menuMouseOver { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #CCC; border: solid 1px #CCF; margin: 0; } .menuKeyDown { width: 100px; clear: both; float: left; BACKGROUND-COLOR: #444; border: solid 1px #CCF; margin: 0;} #menu { height: 200px; } function initNavigation(sElementId, iLevel) { if (!document.getElementById) return; var sDir = ''; var i; for (i=0; i<iLevel; i++) { sDir += '../'; } var arrNav = new Array(); arrNav[arrNav.length] = ['Main', sDir + './Page1.htm']; arrNav[arrNav.length] = ['Medit', sDir + './medit/Page1.htm']; // etc... // Create Menu var elm = document.getElementById(sElementId); for (i=0; i<arrNav.length; i++) { var r; r = document.createElement('span'); r.className='menuItem'; r.innerHTML = '<a href=\''+arrNav[i][1]+'\'>'+arrNav[i][0]+'</a>'; r.onmouseover = function () { this.className = 'menuMouseOver'; } r.onmouseout = function () { this.className = 'menuItem'; } r.onmousedown = function () { this.className = 'menuKeyDown'; } r.onclick = function () { this.className = 'menuKeyDown'; document.location.href = this.childNodes[0].href; } elm.insertBefore(r,null); } }
<div id="menuContainer"></div>
Level specifyes how deep the page is. By the way... I think that you realy shouldn't use absoulte path's to files and images. Instead use relative paths. /M -
Problem redesigning the CSS way1. ok, change the attribute:
BACKGROUND-REPEAT: no-repeat
toBACKGROUND-REPEAT: repeat-x
2. Well.. I am using a CSS-file. and the path is relative to that CSS-file. In C# I am able to specify which CSS to use in my page with the following code. in the client-page..protected System.Web.UI.HtmlControls.HtmlGenericControl styleLink; private void Page_Load(object sender, System.EventArgs e) { string style = HttpContext.Current.Request.ApplicationPath + "/" + System.Configuration.ConfigurationSettings.AppSettings["GeneralStylePage"]; style = style.Replace("//","/"); styleLink.Attributes.Add("href", style);
/Mattias -
Html elements visibility (important)Well.. You can check the size of the window and then check the position of the image. Note however that the position of the image is reltive to the child element if that has the attribute position: set to "realtive" or "absolute". Yea.. and you have to check how much the window has scrolled also...
The functions to use are: // window size. document.body.offsetWidth document.body.offsetHeight .offsetLeft .offsetTop .scrollLeft .scrollTop .style.pixelLeft .style.pixelTop By the way, these are the Explorer specific functions... /M
-
SQL INSERT.. Please Help..Hi. To make an update you do not need the data adapter. Write like this and you will be happy:
SqlConnection con = ... try { using (SqlCommand cmd = new SqlCommand("INSERT ...", con)) { // cmd.CommandType = CommandType.Text; Default is text, ut if you change to something else you should change this here. cmd.ExecuteNonQuery(); } catch (SqlException ex) { // Do stuff... } if (con != null) { con.Dispose(); con = null; }
By the way, using is nice, it runs Dispose() on your command-object automatically. :) /M -
Problem redesigning the CSS wayQuestion 1. Could be achieved in many ways. One way is to use the background property of the div. eg: BACKGROUND-POSITION: right top; BACKGROUND-IMAGE: url(../library/images/RCorner.gif); BACKGROUND-REPEAT: no-repeat Question 2. I recommend using relative links my friend. Makes you happier and life easier in the long term. However, you could use some server side code to create the path to your files, reading the path form a config file. That would not work from html tough. /M