Version 1.1, and it is not automatic. What it does is but all the no current pages in links and the current in a span tag. But you cannot (at least I haven't found a way) to set the CssClass of the current and not current pages. So I ended up setting it for all span tags which means that my default span is bold, which is not really what I wanted.
hertz_j
Posts
-
DataGrid: Setting the current page in bold -
DataGrid: Setting the current page in boldHi, Is there a way to set the current page in bold when using data grids in ASP.NET? Example: 1 2 3 4 Where 3 is the page currently being viewed.
-
Blank default values for varchar fieldHi Eric, I'll try that, thank you.
-
Blank default values for varchar fieldHi I want to use a blank (empty string but not null) as a default value for varchar column in SQL server 2000. Is this possible and if it is, how do I do it (in Enterprise Manager if possible)? Just so that I don’t get a lot of why do you want to do that answers. The underlying data access layer I use need blank values or it won’t create a correct xml files. Thanks Johan
-
Need java community tipsHi, Thanks, I'll check codeguru.
Kevin McFarlane wrote:
Not much Java at codeproject
Not to be rude or anything but don't you think that that might have been one of the reasons that I asked the question in the first place :-D /Johan
-
Need java community tipsHi Thanks I'll check them out. /Johan
-
Need java community tipsHi, Maybe my post was unclear but what I need is not help with a specific problem but just some tips on good java community sites. When it comes to my preferences on community sites I obviously like the code-project. So what I look for is articles, lively discussion boards and a professional approach. Was that clearer? /Johan
-
Need java community tipsHi I’m planning to brush up my Java skills a bit and would appreciate some tips on good java community sites. Thanks Johan
-
Visual styles problemsI just found the solution to the problem, here it is: Just after calling Application.EnableVisualStyles() call Application.DoEvents() Regards Johan
-
Visual styles problemsThis is driving me mad. I have been working on windows forms application for a while and suddenly straight out of the blue the visual style for the buttons stopped working. That is, they go back to looking like buttons in Windows 2000. All other controls that support visual styles seem to be working ok. Does anyone know anything about how to fix this? The really wired thing is that when I tried to do a new form in the same project all works ok for a few compilations and then the buttons just go back to ugly mode again. By the way I’m using .Net 1.1 and visual studio 2003. Regards Johan
-
problemsSorry, I guess I pressed the wrong post. My mistake, I won’t do it again, please forgive me for this if you can possible find it in your heart to do so. ;P
-
problemsIf you are going to post all your interview questions why do you post them one at a time? Just post the whole thing and be done with it. /Johan
-
How to add only numeric values to a textbox controlHi, I don't know if this is the best way of doing it, but you could capture the textbox on change event and then loop through each char in the text field to check if it is a number or not. So something like this:
Public Sub OnTextChange(Byval sender as Object, Byval e EventArgs) Handels T.TextChanged for each c as Char in T.Text.Chars if Not c.IsNumber Then MessageBox.Show("Bla bla bla") end if Next End Sub
Hope this helps /Johan -
Problems loading an AssemblyHi, I'm trying to load an assembly from stream, this works fine. But how do I use the assembly once loaded? I just keep on getting a file not found exception in my code. Any idees? /Johan
-
Including dlls in an exeThanks I'll try that.
-
Including dlls in an exeOk, Well I guess I could but it dont think it would be worth the work it involves. But thanks anyway. /Johan -- modified at 9:49 Tuesday 11th April, 2006
-
Including dlls in an exeIs their a way to include all referenced dlls into the compiled exe file? /Thaks Johan
-
Help with Dynamic CastingHi Dave, To honest, I don’t really “need” to do it in this way either. But it is a nice little exercise, and I think it might even be usefully :-D Once again thanks for your help, it was very appreciated.
-
Help with Dynamic CastingHi Dave, Thanks for the response. My question was probably not very clear. What I want to do is not cast using the xml innertext type but the obj(name) type. I know this looks wired and I guess it is. What I’m doing (and I know when it comes to performance it is just wrong) is to map from the xml node to a property in the object using the name of the properties. Now it becomes even worse, I use reflection to get the properties names and I invoke them instead of setting the normal way. I know this is extremely inefficient in performance terms, but it is very dynamic and I like the simplicity of the code. So what happens is: 1) An XML node is read 2) Loop over the child nodes 3) Set the object (Query) properties to the node value with the same name. (Dynamically casting to the property’s type) Here is the function that does the trick.
'Builds a query from a xml node Private Function BuildQuery(ByRef node As XmlNode) As Query Try Dim obj As New Query 'Map xmlnodes to properties where the names match For Each name As String In obj.Properties If Not node.SelectSingleNode(name) Is Nothing Then 'Dynamically cast to the type of the property Dim code As Integer = CInt(Convert.GetTypeCode(obj(name))) obj(name) = Convert.ChangeType(node.SelectSingleNode(name).InnerText, code) End If Next Return obj Catch ex As Exception Throw New ApplicationException("Falied to build Databasequery object", ex) End Try End Function
On a side note I only use this rarely in the code, for reading data into object and moving data from object into file or database. These are expensive operations anyway so the overhead is not that great compared to the actual workload. That is at least the theory, but I need to do some test to check if it is correct. Thank you very much for your reply. Johan Hertz -
Help with Dynamic CastingHi I want to dynamically cast to whatever type obj is. So I want to change the Boolean part to something like obj.GetType(). obj = CType(node.SelectSingleNode(name).InnerText, Boolean)