
bri189a
Avatar/Signature-
Posts
1014 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by bri189a
-
I have the following class (originally a struct, but wasn't working so changed to class, but still not working). I am saving and trying to pull from ViewState - before adding Serialization attribute had the 'must be Serializable error', so added the attirbute and interface and followed the help files. Still when saving to view state and pulling back out I get 'Nothing' as the value and the special serialization constructor and GetObjectData methods are never called. Haven't had to mess with serialization up until now, so not sure where to go from here. What am I doing wrong. Thanks! <Serializable()> _ Public NotInheritable Class TimePeriod Implements ISerializable Private _month, _year As String Public Property Month() As String Get Return _month End Get Set(ByVal Value As String) _month = Value End Set End Property Public Property Year() As String Get Return _year End Get Set(ByVal Value As String) _year = Value End Set End Property Public Sub New(ByVal m As String, ByVal y As String) Month = m Year = y End Sub Public Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext) Dim m As String = DirectCast(info.GetValue("Month", GetType(String)), String) Dim y As String = DirectCast(info.GetValue("Year", GetType(String)), String) If Not m Is Nothing AndAlso Not y Is Nothing Then Month = m Year = y Else Month = "1" Year = "1900" End If End Sub Public Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, _ ByVal context As System.Runtime.Serialization.StreamingContext) _ Implements System.Runtime.Serialization.ISerializable.GetObjectData info.AddValue("Month", Month, GetType(String)) info.AddValue("Year", Year, GetType(String)) End Sub End Class
-
Google CSS .... for future ref. To answer your question. Give yourself a class in the style sheet for the things you want to have center aligned. Then in that class use the text-align property and set it to center: .centerText { text-align: center; } Again, Google CSS, it will help.
-
I'd say it's probably a misprint too. In actuallity I'd say Employee should be class and Executive a derived class since it IS an employee. But every design has it's own considerations.
-
What does the following exception mean?
bri189a replied to Khaledinho's topic in Database / XML / Reporting
In other words a stored procedure (or function) was expecting a parameter to be passed to it and one wasn't. -
Use a datagrid with template columns and paging turned on. Add the controls to the template column on item created. While that may not be the necessarly correct way (not sure what context you're doing this in), it's the most common method I've seen...
-
to be more secure you would have the password encrypted and do a byte comparission that way it would be harder to hack since LIKE 'BOB' and LIKE 'Bob' would return the same thing if that was the password. If you at least hashed the password and did a binary compare then plain text would be stored on the server. The one mentioned above wouldn't be very secure in comparission to hashing the password and doing a binary compare. Microsoft has some examples of doing this exact thing that you're asking for but I can't seem to locate it right now.
-
use: "~/applicationroot/images/etc.jpg" The '~' takes you to root application regardless of the name.
-
Nevermind, figured it out...just add <> behind the definition.
-
So since VS2003 on my machine is broke right now I'm playing with Beta 2 and noticed that the Of keyword is only for VB --- how do you do generics in C#; interestingly enough can't seem to find any documentation.
-
That column should be a template column. The ItemTemplate should be your label that binds to the date field which will show up as regular text as usual. Your EditItemTemplate will have a calendar control in the template where the date is set to the date field. Then on your update command you'll have to look at the calendar (using something like e.Item.Cells(x).FindControl("clndrName")) to set the new date. Hmmm...I just realized I have a site on there that I need to do that for...wonder where my head was that day... the joys of a programmer...you're never done! :)
-
So I started my VS today (1.1 Professional) and as soon as the window opened I got 'Element not found' error, once IDE was done initializing and start page showed up got same error. Hmmm... So I decided to do a new class library, while loading got 'Catastrophic Failure' error...IDE didn't crash though, however the new project had no references. I checked event log and there was nothing in there that had happened while these errors occured. Any ideas where I can look for an error log or things to check before I reinstall? EDIT: I do have Beta 2 loaded also...both have been playing nicely together for sometime now and last time I was working everything worked great.
-
How does it run on Safari or some other 'MAC' browser? Is it possible that you can just use the server.request.browser properties to detect that it's a MAC and IE and just redirect them to generic html page that says because of errors in IE for Macintosh the site is not viewable or something along that nature? It sounds like a fun problem, that's for sure, only if I had a Mac to see it for myself...but I don't...darn :)
-
It's a macintosh...'crash different' (if you haven't seen it: http://www.happynowhere.net/mac_parody.php) Seriously though, the version of IE on macs doesn't support nearly what it does on a PC. I would imagine it has something to do with the javascript ASP creates, but that javascript is pretty generic and I can't see why it would be the error, everything else about a drop down list and datagrid are common html tags when rendered. Make sure you have the most recent verision of IE for your mac and any hotfixes that are out.
-
I think if we saw the code it might shed some light on things. Something is causing it to wrap, it may be something outside of the panel...a CSS style or something like that. The addition of the style should of took care of the wrapping, it may be .NET is over-writing it, never done it before to be honest...things like that I've used a table or repeater for.
-
The problem is that a panel translates to a div tag which by nature is a block element (i.e. it will go to a new line). If you add the style attribute to the panel (display) and give it the value (in-line) you should be fine. This will have it display as shown in the code for view source: <div style="display: inline"> Alternatively you might want to try a differant control...like a table, or span element and have it run on the server.
-
Page.RegisterStartUpScript to have script run as soon as page is loaded.
-
Dim s as String = "asdf" Dim x as Integer = s.IndexOf("sd")
-
We've all done it.
-
Because you called AcceptChanges(). Update will call it for you after it calls the appropriate Insert command internally.
-
Which is the main reason to remove the VB6 reference. You should also turn Option Strict on. These two things will increase the quality of code you write. It may take experaince to increase it in other ways, but this is a deffinite first step. Keep in mind to the performance implications of calling VB6 code and the lack of portability to C# or even to newer version of VB.NET as they phase out legacy support.
-
Change Private Sub calP3_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles calP1.SelectionChanged txtP3_Date.Text = calP3.SelectedDate End Sub TO Private Sub calP3_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles calP3.SelectionChanged txtP3_Date.Text = calP3.SelectedDate End Sub
-
Beta 2 is free from Microsoft, in order to deploy though you need a go live license, however it's beta, so it's unsupported for one, and two, a lot will change between now and the end of the year when the final product is released. It's not meant for full development yet.
-
C# - This is truly irritating! BUGGY?
bri189a replied to EFileTahi-A's topic in Directory / File IO / Registry
Have the watch look at the variables being assigned rather than the output of the reader as PD mentioned. -
C# - This is truly irritating! BUGGY?
bri189a replied to EFileTahi-A's topic in Directory / File IO / Registry
Sorry, it one of those things I've done myself, (and probably the other) guy, and I've wasted time looking for...because I wasn't thinking about what the debug commands were doing the variables; it wasn't meant to be a jab at you...sorry...more of a laugh of 'hey, I'm not the only one who does this!', and I think we both thought you would see the problem if we pointed your focus to the watch window, I again I appologize. It's advancing twice because once it advances in your code, but then the watch advances it one too because the reader in the watch is by reference...now if it's still doing it after you remove the watch, then then I humbly withdraw my comment, but that is what seems to be the obvious problem as it stands now. -
Can you zip the page and code behind and post it, I'll look at it later on, or one of the other guys will.