f1 fan 16 Posting Whiz in Training

how have you set up the virtual directory in iis? under the root? Are you using the correct host header? What about dns - is it pointing to the new machine?

f1 fan 16 Posting Whiz in Training

All frameworks are backwards compatible... so yes you can uninstall older versions.

f1 fan 16 Posting Whiz in Training

do you mean the framework runtime or the sdk? What are you trying to do? for apps they just need the redistributable dotnetfx.exe (make sure you download the right one although they are backwards compatible).

f1 fan 16 Posting Whiz in Training

Just one quick one on stored procedure names... dont prefix a stored procedure with sp_ use anything but this as when you call a stored procedure SQL Server looks at the name and if it starts with sp_ it will go to the master database first, do a search for the stored proc and only when it fails will it then look in your database. It can be a big performance hit.

f1 fan 16 Posting Whiz in Training

OK first of all the custom Errors problem. IIS doesnt like the /> closing tag. You have to use <customErrors mode="Off"></customErrors> that will work

Second problem was the closing tag of connection strings... it should be </connectionStrings> not <connectionStrings/> as you had it... easy mistake - always pays to double check your xml :)

f1 fan 16 Posting Whiz in Training

I dont think he wants to draw to the button though, which is why i asked. hopefully he will know how to get the graphics of whatever control he wants to draw to from your code :)

f1 fan 16 Posting Whiz in Training

Use the Directory, DirectoryInfo, File and FileInfo classes in the System.IO namespace

f1 fan 16 Posting Whiz in Training

Where to start.. your logic is wrong i suspect. Your code will draw it in the button.
First problem is your cast error you mention...
DrawLinesPointF(sender, (PaintEventArgs) e);

you are trying to cast e to PaintEventArgs but e is a SystemEventArgs which is empty so there is no way it will ever cast.

Secondly you are sending the button as the sender to your DrawLinesPointF function and in that function you get the graphics object to draw to, hence you will draw in the button and not on your form.

If you tell us what you are trying to achieve and on what then we can help, but rethink your logic first.

f1 fan 16 Posting Whiz in Training

so you want to auto refresh the page at set times?
Best way to do it is to put it in the META tag. It is the same technique as an auto redirect to another page, only this time you are reloading your own page.

You can either code this in the markup when you design it or you can add it later in code when you want it.

in code you need to add the following line
Response.Write("<Meta http-equiv='REFRESH' content='20;URL=mypage.aspx' />");

and in markup you just need
<Meta http-equiv='REFRESH' content='20;URL=mypage.aspx' />

the 20 means 20 seconds, so put your own time in there. It is as simple as that

f1 fan 16 Posting Whiz in Training

it is possible but a bit tricky. And depends if you want to send the client there or not. In all cases you need to pass a variable in the request to b and then on page load you would need to check for this variable and call your sub then decide if you need to call the rest of page load or not. To do it by sending the browser you would need to create a public property for the variable in page a and then call response redirect or server.transfer to b. in Page load for b you would need to get the context.handler and then cast it to page a and then get the public property you created.
to do it behind the scenes you would be best to use the HttpWebRequest and add your variable to the content then handle it in page b page load again.

All the ways are pretty messy and not advisable. I would recommend you create a class which has the subroutine in it and then you can call the subroutine from any page cleanly and quickly.

f1 fan 16 Posting Whiz in Training

no need to for loop them, if you know the delimiter then you should be able to put them straight into an array.

But yes you are correct. Once you have an array just set the grid datasource to the array and then call Databind on the grid.

Just as a thought, i assume the dat file is using a table like structure but you want to save it to disk not a database? If so i would recommend creating a dataset or strongly typed dataset in memory and then call the dataset.save method. Then you can call the dataset.read method when you want it and just bind to the grid without the for loop array. It makes searching and filtering much better. You dont need a back end database with ADO.net that is why they split the datasets from the dataadapters.

f1 fan 16 Posting Whiz in Training

Can you use the string value of the enum instead of the long? You say that you know that myVal is always part of the enum t. so i am assuming you are storing it somewhere. If you could get the string value of the enum for myVal instead then it is a simple case of calling Enum.Parse(t, myValString) which returns an object. Does that help?

if you dont have the string value then you try
string myValString = Enum.GetName(t, myVal);
object theObject = Enum.Parse(t, myValString);

Please ensure you use the Enum not enum.

Hope it helps

f1 fan 16 Posting Whiz in Training

You can bind the Datagrid to arrays and other similar collections.
Which version of VS are you using? If you are using VS2005 try the DataList control, it is much better for your use and you can code tables in the templates

f1 fan 16 Posting Whiz in Training

I agree. However should you need to pause the thread while another thread completes then use thread.sleep(timetosleep)

f1 fan 16 Posting Whiz in Training

This is a new security feature for .net2. <%@ Page EnableEventValidation="true" %> is new security feature to stop tampering with your controls. in your code you changed some controls on the server side and then tried to load the page and it recognised they were changed in your event. At the end of your event call Response.redirect("login.aspx") and it will solve the problem for you.

f1 fan 16 Posting Whiz in Training

you need wizCreateBulk.FindControl("txtName") the wizard control is the parent control not the templates...

f1 fan 16 Posting Whiz in Training

are you talking about a popup window or a whole new webpage/site? if you need to do a new browser window with a webpage then in the link that you have you need to set the target="_blank"

if you want to just do a popup window then the best way is a javascript:window.popup() script on the client. You can do this a few ways - code it in the source on the aspx page, have a function in a script file somewhere (preferable to script in the html) or call the ClientRegisterScript in your code behind.

f1 fan 16 Posting Whiz in Training

First I am worried as to why you are creating VS projects on Win2k3????
It is recommended to develop the project on a local pc (Say running XP) and then upload the final site to a webserver. If you need to share the project with other developers there are ways to do it with source control etc.

If you need to create a project on a server then i am assuming you do not have visual studio installed on the server and are trying to use a network path to create it on there?

Can you confirm where VS is installed and whether you are on the win2k3 server creating the project or whether you are on a pc using a network path

f1 fan 16 Posting Whiz in Training

I am slightly lost but i think i know what you mean.
In design view in all VS (2002, 2003 and 2005) you can click the events icon in the properties box (normally you have it in properties view to fill in the name, text, color etc.).
Switching to events view shows all the events available (key-press, mouseover, click, doubleclick etc). By double clicking the event name you want, VS will automatically put the code block in (as it did with the default code block for the control but this time the event you chose).
The will put that code block in the file it defaults to (normally your default .cs file partial class in 2005). If you have created a partial class yourself (say JUST for event handling - and on larger objects it is a good idea) then unfortunately VS does not know where you want things so have to manually add the event handler in code typing in

object.eventname += new Eventnamehandler (event signature)

When you type the += VS will automatically ask you in intellisense if you want to add the default handler signature stuff.

f1 fan 16 Posting Whiz in Training

My money is on you havent called filestream.close() after reading or writing. This means the file is exclusively locked and can not be used by anything else (the same effect as if you try to open a word doc on a shared folder when someone else has it opened... you cannot write until they finish)

f1 fan 16 Posting Whiz in Training

string theString = "hello";
char[] theStringAsArray = s.ToCharArray();

f1 fan 16 Posting Whiz in Training

I am not sure why you want to return an object instead of the ActionValue type but you want

public object ToActionType(Long myval)
{
int myIntVal = (int)myval;
ActionTypes myActionType = (ActionTypes) myIntVal;
return (object) myActionType;
}