Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Wow... well that explains the short time where it became impossible to log in and the following period where the site became non-responsive entirely.

Hope all works out in fixing whatever went wrong :(

On a side note, assuming it didn't go poof during the difficulties there's a rather positive instant message waiting for you cscgal :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

We're having issues. :) They're being worked on.

I don't doubt they are :) As I said, just keeping the thread active until solved in case others spot the same problem and go looking for a thread about it :P

By the way, would this be a bad time for me to mention how much I appreciate this site and it's posting community? lol It's effectively kept me distracted for hours on end while I'm doing my job search and website development projects.

Now, if only we could find a way to get people to mark solved threads as solved or to keep their questions to one thread in the correct area this site would be perfect!!

Edit: for the record, at THIS moment the profile page is showing correctly.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

http://msdn.microsoft.com/en-us/library/bb610835.aspx
and
http://msdn.microsoft.com/en-us/library/bb611833.aspx

Might help you get closer to your solution :) I've never worked with Interop.Outlook myself but I hope those resources help.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, I lied...

The problem is back now (profile page issue).

Un-solving thread :twisted:

Edit: It seems to be coming and going... When I posted before and "solved" the thread it was fixed, then I un-solved this thread because it was broken again, now it seems fixed again but I'll just watch it for a bit before I re-solve the thread lol

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I would recommend you read this page regarding media player properties.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It may be too late for this now (as I think the edit option only remains for a short time after posting and definitely not after a reply has been made) but in future when posting code like above I'd recommend either using the code formatting option (instead of quote) or deselecting the option that displays smileys in your post (at the bottom below the post creation button.

As it stands right now a large amount of your code segment above is filled with smileys which makes it harder to read through what's being done.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Rohan,

I might recommend reading the following tutorial on "How to create CSV file in ASP.NET from database" as it may answer your question.

Hope this helps :) Please mark as solved if this resolves your issue.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

i have just elaborated the above post,
I would ask u not to pass as string to numeric and integer values, instead convert them into integer or numeric, which ever suits, and then update it to the database, i suppose thats the place where you r getting an exception which is leading u to the popup msg 'Failed to update'...
'I hope this helps.

arunkumars;
In one of my other posts I already brought up the issue of incorrect value types being passed but it was never answered as to what data types were being used for each column in the table.

Also, this thread has been (inadvertently) continued in this new thread so please focus any further attempts to solve this issue there as more progress seems to have been made in that thread than here :P

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I hesitate to mark this as solved because I don't know if the issues raised by other folks (mods) in the thread have also been solved.

However, my profile issue seems to have gotten sorted and the "Solved:" tags appear to be showing up properly in the regular (read: non-mod) forums so...

Marking solved and thanks for the quick turnaround whatever ya did to fix it :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

There was a database problem yesterday which should be resolved now, as I understand it.

Is that in regards to the "Solved:" tag on the forums or the profile page issue? Because as of just now my profile page still has widely varying stats (you can likely see it for yourself).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I doubt that's what he wants to be honest. But even so he would have to re-open the initial base stream every call, or, perform a seek to the beginning of the file.

Actually, re-reading the original post...

It looks more like he wants to do the following:

Open file in reader -> Pass to function

In function: read line 1 to variable -> read line 2 to variable -> read line 3 just to set position in file -> pass back out of function

outside function: continue from file position and perform further tasks.

So ya, looks like I completely butchered it hehe... That's what I get for being over-tired and under-rested :yawn:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

There's also a problem with some threads showing up as unsolved in the thread-listing, but are solved when you open them. @Dani: Check the reported posts forum please.

I've seen this as well that the posts are not showing the "Solved:" in front of their name but are listed as solved when you open them. However this is not affecting the solved count (the correct one that shows when I mouse-over my avatar) as the posts are still being tallied into that figure.

It's actually somewhat odd that some of the statistical information is showing accurately while other statistics are skewed. But not being the person with access to the code-behind I'm not likely to ever know what went wrong there :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Your update statement is wrong. you can't update SerialNo from this query.....

Any chance you could provide some code example for kayfar so they can see what would correct it?

As for me, I'm going to sleep :zzz:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Maybe I just wasn't clarifying what I was trying to say (I've been awake way too many hours the past few days)...

Basically my interpretation of the problem was that the process in the first code segment was being called more than once and... when called the first time, worked as intended. When called subsequent times, it was intended to replicate the results of the first call but didn't.

My read into the cause of this is that the streamreader for the enclosed loop never closes and never resets to line 0 of the stream so in subsequent calls it basically does the following:

First call (line 0, 1, 2)
Second call (line 3, 4, 5)

and so forth.

I could be interpreting the situation completely incorrectly tho.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm confused is this an ASP.Net web-app or a C# windows forms app?

I ask only because of the reference to "when user submits a webpage"

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok, now that we've got an error message result...

Read this thread that might help resolve your issue

My first guess based on the above thread and the error you posted is a mis-match between the data types you are trying to insert and the data type of the column in the access database OR that you've used a reserved word in the definition of one of your columns.

Beyond that, I'll let the Access experts around here troubleshoot going forward :) but at least we have some errors to work with now.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Kayfar...

1) Did you change the code to

catch (Exception ex)
{
    ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert ('" + ex.ToString() + "');</script>");
}

2) with this code in place, not your original code of

catch (Exception)
{
    ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert ('Fail to Updated!');</script>");
}

I want you to run your app in the browser.

Instead of receiving "Failed to Update!" you should receive a different message that represents the error that the application is encountering when it fails.

This error is what we need to see.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Just to confirm...

What you're looking for is a method to allow a menu or other control on your page to maintain it's position on the screen no matter what the user does on the screen (resize, scroll, etc). Is that correct?

If that's the case, you might be able to get away with using absolute positioning to achieve this effect (tho I can't recall if absolute positioning is in relation to the window or the content container). I also know there are javascripts out there that will allow a sort of "floating" component effect where the script maintains the component's position irregardless of scrolling and such.

Edit: My bad, it was "Fixed" not "Absolute" :P

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well the articles outline the usage which gives an idea of the reason behind the usage but other than that I guess I'll pass and let someone with more in-depth coding theory knowledge give this one a go :)

Sorry I wasn't much help in this case.

Member 785339 commented: Thanks for Replying +0
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I may just not be seeing an already created thread about this and I hope I'm posting in the right place about it.

Just today I've started having some rather interesting statistic information showing up in my profile page that doesn't match what the real statistics SHOULD be.

As an example:
Profile page shows "Total Posts: 215"
Total count based on the central section showing posts per forum shows 119 (which is the correct amount)

Profile page shows "Forum threads marked solved after Lusiphur replied to them: 20"
Mouse-over on my avatar in a thread I've posted in shows 11 (the correct number even though I've solved many more and users are too lazy to mark their threads solved)

Profile page shows "Posts Per Day: 21.44" which should be closer to 10.

Not sure what's causing these issues but thought I'd point them out as it seems to be a bug somewhere in the way the data is being read/translated and output to the profile page.

Thanks for your time on this :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Realistically if you're looking for information on the various aspects of C# programming (such as class types) I would strongly recommend the msdn.microsoft.com resource site.

Most any information you need regarding how to utilize methods and classes available in C# can be found at that site along with code samples showing their implementation.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Glad I could help :) Don't forget to mark solved so others don't think the issue is still unresolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Right, I didn't solve the problem with my suggestion above but...

it should be telling you the exception that is being thrown in the pop-up and what I'm asking you to do is to write that exception in this thread so we (the rest of us who've been trying to help you troubleshoot) can see what error you are getting.

This will help us to figure out what specifically is malfunctioning in your code and help us better solve your issue for you.

So... When the pop-up comes up (using the code modification I gave you in THIS thread above) please write down or copy or whatever the error message it shows and paste it in this thread.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

My suggestion, enclose the process that you're using to populate the gridview in the following construct:

if (!Page.IsPostBack)
{
    GridViewPopulation();
}

Replace "GridViewPopulation()" with a procedure for populating your GridView control and it should only load on the initial page load and not on a postback event, hopefully preserving your GridView content.

Hope this helps :) Mark as solved if it resolves your issue.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Sorry if you didn't catch the rest as I was editing when you replied but ya, should work and only way to be sure is to implement it yourself.

Hope it helps :) Please mark as solved if your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It appears that this setup can be used in ASP.Net, at least I'm assuming as much or Visual Web Developer wouldn't allow the structure to be written and I get no errors with it when I input it into my test project I use when debugging issues for posters here :)

Realistically most class definition types (such as variables and methods) are interchangeable between C# and ASP.Net, some object methods however are not (ex: textBox.SelectedText is available in C# but not ASP.Net).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

A quick note to this scenario.

If you're looking for a dynamically positioned background (floating horizontally based on browser width) you will never be able to achieve background extension beyond the bottom of the page content.

The only way to force a DIV to expand to a set length is to use absolute positioning which eliminates the left/right margin float or to extend the content to force the DIV to extend with it.

I was looking into a lot of resources to try to solve an identical problem to this and there is currently no way that I've found of fixing a DIV height without absolute positioning.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Another resource to look at (if you haven't already) is at this page.

Shows the use of the InternetExplorer object class which has adjustable properties including height and width.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Yes and no... You're working on a windows application but you're calling your process in a browser which is why I figure that this *might* just work. Couldn't hurt to give it a try, no? :P

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Try the code sample at this page as it seems to do exactly what you want.

Seems to be a combination of C# and JavaScript coding to accomplish the effect.

Hope this helps :) Mark as solved if it does.

Edit: As a side note, the above sample appears to be for a web-app deployment, if you're working on a windows forms app then the sample may not work the same in a non-browser environment.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

One package that you can install directly into Visual Web Developer as a toolkit is the AJAX Control Toolkit available from htp://www.ASP.net which gives a set of pre-built AJAX controls and features that are relatively easy to configure if you know anything about CSS.

One of the many controls in the toolkit is a tab container that you can easily drag-and-drop into your project and configure with minimal fuss.

Hope this helps :)

Edit: Um... ya, what Yousuf said ((Darn you for beating me to it :P ))

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Wow... really? Your other post was already moved over here by a moderator, you've already had people working on your code for days now... duplicating this thread seems a bit redundant :)

That being said try changing

catch (Exception)
{
    ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert ('Fail to Updated!');</script>");
}

to this

catch (Exception ex)
{
    ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert ('" + ex.ToString() + "');</script>");
}

This should give the exception detail that generates your problem instead of just "Fail to Updated". Once you have the actual exception detail post it here so we can see what, specifically, is generating your problem. ((As we've asked you to do in various ways for 2 days now in your original thread))

Thanks again :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok first off, is this a web application or a windows forms application? Because if MessageBox is not available that tells me that you're not running a windows forms app which means (if this is a web-application, ie: run from browser) you should've posted this in the ASP.Net forum to begin with.

Second, try changing the "e" to err or something but if you don't have MessageBox then you'll have to use an alert or something to show the error text on the screen.

Unfortunately I need to step away for a bit so I don't know when I'll next be able to get back to this thread.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Hmm... Now I'm confused lol... and the difficulty is that you declare the reader within the 2nd function so it can't be managed from outside that function.

What I might recommend is that you take

TextReader read = new StreamReader(fin);

and declare it just below the fin stream instead of inside it's function. Then change the process for the 2nd read to read

public void setBionic ()
    {
        name = read.ReadLine();
        Aname = read.ReadLine();
        string hold = read.ReadLine();
    }

Also, what are you doing with "string hold"? because it's declared in the function but never used and the function is set to return "void" so "hold" seems to be redundant unless it's just a placeholder to cause a 3rd ReadLine.

In the end the new code segment to match your top segment would be:

Stream fin = File.Open("Bionics.txt", FileMode.Open);
TextReader file = new StreamReader(fin);
TextReader read = new StreamReader(fin);

for (int ct = 0; ct < 4; ct++)
{
    metal[ct].setBionic(fin);
}

read.Close();
fin.Close();

Of course, now I'm thoroughly confused however as to why you have a need for 2 readers for the same file... unless you have multiple calls to multiple files being handled with the 2nd process there.

The problem is that the 2nd reader is being called repetatively within a loop from the first function without ever closing afterward. Alternately if you need the 2nd reader's properties (fin) to be determined dynamically from outside the property you could still declare the reader …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

catch (Exception e)
{
MessageBox.Show(e.ToString());
//ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert('Fail to Updated!');</script>");
}

i cannot use this..it come up with 2 errors..

Can you tell us what 2 errors you get when you tried this though?

I understand that you are getting errors but about 90% of what we're trying to accomplish here is to find out which errors you're getting so we can help diagnose this.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

While I'm seeing the close of the "fin" stream I'm not seeing the close of the "read" stream.

My guess here is that it may be possible that your "read" stream is picking up where it left off instead of starting at the top of the stream again when called subsequent to the first pass.

I could be wrong though :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'll throw my 2 cents in here too...

I believe web design to be an "art form" in that it requires a solid understanding of form, colour and contrast to successfully pull off an appealing (visually) website.

Contrary to what some people may think, web design is not just a "click of a button" but rather a very time intensive process of balancing visual and textual elements. As a subcategory, graphic design (read: visual media aka "art") is required to a large degree in web design as (if you're a true web designer) you need to create graphical and multimedia elements to match the tone and style of your site and work those elements into the overall presentation of the site in a visually appealing way.

For people to say that web design is not an art is comparable to saying that architecture has no artistic component. Both are very similar in the way they are acomplished starting with concept, moving through planning, layout and execution.

Again, just my 2 cents :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Also, this link might help as well. Outlines the use of .StrConv method to convert strings of different languages.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I do apologize but at this point I'm just not spotting the issue per-se... it's almost 3am here and I think my brain's shut down for the night. Hopefully someone else will be able to help you sooner than later with the information you've provided here.

Sorry I wasn't able to be of more help :(

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I have to ask, do you have the foreign language you are attempting to read installed on your operating system in the first place?

I just ran a few dummy tests utilizing hiragana as a sample and had no issue displaying a string of hiragana text in both a textbox and a messagebox.

However, I do note that if I attempt to read into a string from hiragana input into a text box it gets problematic.

What I might recommend is having a look at this link as it explains a process for recognition of foreign language inputs as well as other common input types but beyond that I'm not sure how to fully help with your question.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

if you use the format

SqlCommand cmd = new SqlCommand("update tableRegister set IpAddType =@IpAddType where SerialNo="+TextBox1.ToString() + "", cn);

you no longer need to use

cmd.Parameters.AddWithValue("SerialNo", textBox1.Text);

since you are adding the variable directly to the string instead of declaring it as a parameter and using the @parametername to insert it into the string.

However, unless you declare @IpAddType as a parameter this code will not work. Basically you can do it either by declaring all the variables as parameters and adding the parameters with @paramName or you can do it where you use " + TextBox1.Text + " replacing the textbox name with the appropriate textbox name at each variable insert.

Something to note... TextBox1.ToString() will not give you the text value of the textbox, TextBox1.Text will.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Try this, change this segment of your code as below:

catch (Exception e)
      {
      MessageBox.Show(e.ToString());
      //ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert('Fail to Updated!');</script>");
      }

This should bring up a messagebox who's text will state the exception that is being thrown and allow you to copy/paste it for us.

Edit: it's 2am here forgot the .ToString() in the above code.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

As a side note, I notice you changed the UPDATE string to match the format that I suggested, however... is this the actual string you're using?

String sqlQuery = "INSERT INTO tableRegister (SerialNo,StaffName,StaffID,[Hostname],[Department],[Section],[Extension], Type, IpAddType, IpAdd, MacAdd, CpuBrand, CpuModel, Processor, HardDisk, HDType, RAM, RAMType, MonBrand, MonModel, MonSerialNo, MouBrand, MouModel, MouSerialNo, KeybBrand, KeybModel, KeybSerialNo, CdPlay, CdPlayBrand, CdPlayModel, CdPlayType, Windows, Other, WProdKey, MS, MSProdKey, SoftwareName, LicenceNo, Remarks) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

If it is, then there's a major problem right there, the ?'s need to be replaced with the parameter names you declared and need to be in the same order as the columns are listed in the first part of the INSERT statement. Also, maybe I'm missing something but wasn't this an UPDATE string before and now it's an INSERT? Or are we working with different strings here?

I do have to admit I was mildly mistaken earlier with the formatting as you were correct with

String sqlQuery = "UPDATE tableRegister SET  StaffName=@TextBox1, StaffID=@TextBox2, [Hostname]=@TextBox3, [Department]=@TextBox4, [Section]=@TextBox5, [Extension]=@TextBox6, Type=@TextBox40, IpAddType=@TextBox8, IpAdd=@TextBox9, MacAdd=@TextBox10, CpuBrand=@TextBox11, CpuModel=@TextBox12, Processor=@TextBox13, HardDisk=@TextBox14, HDType=@TextBox15, RAM=@TextBox16, RAMType=@TextBox17, MonBrand=@TextBox18, MonModel=@TextBox19, MonSerialNo=@TextBox20, MouBrand=@TextBox21, MouModel=@TextBox22, MouSerialNo=@TextBox23, KeybBrand=@TextBox24, KeybModel=@TextBox25, KeybSerialNo=@TextBox26, CdPlay=@TextBox27, CdPlayBrand=@TextBox28, CdPlayModel=@TextBox29, CdPlayType=@TextBox31, Windows=@TextBox32, Other=@TextBox33, WProdKey=@TextBox34, MS=@TextBox35, MSProdKey=@TextBox36, SoftwareName=@TextBox37, LicenceNo=@TextBox38, Remarks=@TextBox39 WHERE SerialNo=@TextBox41";

The only thing missing in that was (as mentioned by someone else) that @TextBox41 was not defined in your list of "aCommand.Parameters.AddWithValue".

However, if you are now performing as an INSERT instead of an UPDATE then the format I provided earlier is correct (minus the WHERE clause) for inserting …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

One thing that would be helpful in determining the nature of the problem here is if you were able to capture the exception that's throwing

catch (Exception)
{
ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert ('Fail to Updated!');</script>");
}

This would at least give us an idea of where the problem is by telling us what error is being generated.

My gut feeling is that it may be related to data types. Are all the columns in your DB varchar variants? or do you have numeric values? or dateTime values, etc?

From what I'm seeing because all of your inputs are being derived as "aCommand.Parameters.AddWithValue" from .Text components of textboxes you're implicitly declaring them all as varchar dataType. That being the case, when you go to update the columns and hit a numeric or Int colum for example, it will throw an error as not being able to convert varchar to numeric from the DB server end.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I just tried to replicate using my Visual C# 2010 Express with an unmounted database I grabbed off of my MS SQL Server 2008.

I imported the unmounted DB into a test project I use when trying to troubleshoot for posts here and had no difficulty reading from and updating information in the unmounted DB. I ran the test app, closed it, ran it again, closed VS altogether, re-opened it, re-ran the app...

Unless you can provide some code examples of what it is you are trying to do and how you're coding it I'm just not finding myself able to replicate the problem you're describing at this time, I'm sorry.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm not going to claim to be an expert at everything SQL, however, when I write an UPDATE string I do it as follows:

string sqlQuery = "UPDATE tableRegister SET {StaffName,StaffID,Hostname,Department,etc...} VALUES {@TextBox1,@TextBox2,@TextBox3,etc...} WHERE SerialNo=@TextBox41"

I'm not 100% sure that your method using "StaffName=@TextBox1, StaffID=@TextBox2, [Hostname]=@TextBox3" to set the values of the updated components is valid.

Hope this helps :) Please mark as solved if it resolves your issue.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Ok... um... let's try this approach (because honestly without knowing your actual html code and without spending the next half hour to an hour writing your code for you all I can do is give an example from my own code).
On my html page(between the <head></head> tags:

<style type="text/css">
<!--
@import url("resStyles.css"); //imports resStyles.css stylesheet
-->
</style>

The body tag:

<body id="bodyBG">

sets the body properties to match #bodyBG in my CSS file

#bodyBG {
	background-color:#CCC;
	margin-top: 0;
}

The first DIV tag

<div id="bg">

sets a "wrapper" around the rest of the page which contains my primary "centered" background image as outlined by #bg in my CSS file

#bg {
	width: 800px; //Sets the width of the DIV to 800px
	margin-left: auto; //Sets the left margin to auto
	margin-right:auto; //Sets the right margin to auto (combined with left makes 800px div 'float' if page wider than 800px)
	background-color:#CCC; //Sets the background colour of the div to #CCC
	background-image: url(imgs/bg_patt.png); //Sets the background image to imgs/bg_patt.png
	background-repeat: repeat-y; //Sets repeat value on background image to have it repeat down the y axis (vertically)
	background-position:top; //Positions background to top of DIV
	padding: 0; //Sets 0 padding to all sides of DIV
}

The second DIV tag

<div align="center" id="Content">

Sets a center aligned DIV with properties to match #Content in my CSS files, this DIV contains the background image behind my logo and navigation segment of the page.

#Content {
	width:800px; //Sets …
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I just want to clarify here...

You're saying you detached your DB from SQL Server 2005 and attached it on VS 2008. So, did you convert it to a flat DB file? or did you re-mount it on SQL Server 2008 (assuming you installed with VS 2008 but I could be wrong)?

Can you provide code snippets to show your connections to the DB and the procedures you're using to retrieve/store the data so we can possibly try to troubleshoot them please?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

First off... MY EYES!!!

Ok, now that I got that out of my system...

Can you please provide an example of what is happening when you run the code? You've provided a very large chunk of code asking us to "correct" it for you but you haven't told us what's going wrong or what it's supposed to achieve.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

There are methods for calling the inner screen resolution of the browser at time of page load using JavaScript and providing tailored output dependant on pre-set resolution values but...

I tend to avoid that sort of process because it means 1) having to tailor content to either have all elements resizable without distortion or 2) creating multiple copies of your pages to accomodate different resolutions and with the vast number of variations in monitor sizes available these days #2 is very impractical and #1 can be unpredictable in the way it displays.

It's generally easier to build to a specific minimum dimension (in my case 800px width) and dynamically account for extra margin space than to try to completely "fit to screen" your content.

Again, just my opinion though :)