vuyiswamb 17 Posting Whiz

First of all what you need to do, when the User logs in, Carry the Username in the Session variable like this


//if the user is Successfully logged in

Session["Username"]  = txtusername.text;

and in all your other pages , you will probably have a Label that will Display the name of the User who is currently logged in , you would get the value from the Session like this

lblUser.Text   = Session["Username"].Tostring();

And when your user logout of your Session then you need to abandon the session or set it to null

Session["Username"] = null

Hope this Helps


Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

Wrap your Controls in an Update-panel the flickering will go away as i did here

http://www.dotnetfunda.com/articles/article732-how-to-create-ficker-free-pages-aspnet-ajax-.aspx

vuyiswamb 17 Posting Whiz

What Template do you have ? Is it a website Template ?

vuyiswamb 17 Posting Whiz

You wrote : The Problem is I can't run Application without installing Vs?

I don't believe this , is this a Question because i see a question mark.


You wrote:is there any solution?
can I run setup without install visual studio?

yes you can, it should be like that. if i designed my website with asp.net and visual studio 2010 it does not mean i have to install vs on the server.

vuyiswamb 17 Posting Whiz

I think you need a Scheduler, Someone asked this Yesterday. I have the Same Answer for you too, there are Schedulers that you can use. I am doing the timetabling and Resource Management System use Telerik Schedular its Good , look at this

http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx

vuyiswamb 17 Posting Whiz

Yes the textbox will always be clear. there is only one Solution to this , is to use Ajax.if the flickering of the page causes this, what you need to do, is to add a scriptmanager to your page and add an updatepanel and add the textbox inside the Update panel. This solution will only work for a asp.net Textbox , but if its a html textbox then after the calculation you need to reassign the session value to the textbox as reach_yousuf demostrated.use the alerts to check the contents of the session.

vuyiswamb 17 Posting Whiz

Does the onselectedindexchanged gets Fired ?

Place a BreakPoint on it and add a value so that the Javascript test can be true.

vuyiswamb 17 Posting Whiz

I think you are not doing this correctly. i haven't touched ole for long now, but change your code to look like this

string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Catherine\\Documents\\LearningCSharp.accdb";
        OleDbConnection myConnection = new OleDbConnection(connectionString);
        myConnection.Open();

        int employeeNumber = int.Parse(textBox1.Text);
        string name = textBox2.Text;
        string address = textBox3.Text;
        string query = "update EMPLOYEE set EmployeeName=[B] ?[/B] , Address=[B]?[/B] where EmployeeID = [B]?[/B]";

        OleDbCommand myCommand = new OleDbCommand();
        myCommand.Parameters.Add("@name").value =  name;
 myCommand.Parameters.Add("@employeeNumber").value = address;
 myCommand.Parameters.Add("@employeeNumber").value = employeeNumber;
        myCommand.CommandText = query;
        myCommand.Connection = myConnection;
        myCommand.ExecuteNonQuery();

        myConnection.Close();[/CODE]

The Sequence of the parameters must be the same. That means the first "?" must correspond to the first definition of the parameter. you got that error because your sql statement tells ado.net that there is a parameter and when it look it does not find any definition of a parameter.

Thanks in advance.

vuyiswamb 17 Posting Whiz

You are Welcome. Mark the Thread as Resolved and give one of us a Reputation is we deserve it

Kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

You are Welcome

vuyiswamb 17 Posting Whiz

Mark the Post as Resovled and give Reputation if i deserve it :)

Kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

How many web config do you have in your Project ?

Do something for me, so that i can know what is the problem exactly. go to one of the aspx file and right click -- Open with --> Notepad and Tell me what you see there.

Kind Regards


Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

Your SQL Table Must have a Identity Column first change the Defination of your table to this

CREATE TABLE mytable
      (
      id INT IDENTITY(1,1) PRIMARY KEY not null,
      Fname text,
      Surname text,
      Tel text,
      Salary DECIMAL(18,2)
    );
vuyiswamb 17 Posting Whiz

No Problem and dont Forget to mark the post as resolved and give me my reputation. am going home now enjoy your weekend

Kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

Here is your Solution

SqlConnection con =new SqlConnection(@"User id=sa;Password=oops;Server=VUYISWA\SQLEXPRESS;Database=Vuyiswa");
        
        SqlCommand cmdinsert = new SqlCommand();
        
        cmdinsert.CommandText=@"BULK INSERT mytable FROM 'C:\WebSite29\Data.txt' WITH (FIELDTERMINATOR = '|', ROWTERMINATOR = '\n' );";

        cmdinsert.CommandTimeout = 0;

        cmdinsert.CommandType= CommandType.Text;

        cmdinsert.Connection = con;

        try
        {
            con.Open();

            cmdinsert.ExecuteNonQuery();

        }
        catch(SqlException ex)
        {

            Label1.Text = ex.Message.ToString();
        }   
        finally
        {
            if(con != null)
            {
                con.Close();
            }
        }

Kind Regards

Vuyiswa

vuyiswamb 17 Posting Whiz

ok

vuyiswamb 17 Posting Whiz

Can you Post your TextFile and a Create Script of your SQl Table and i will give you an Exact code to write.

kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

Remove the First Column and let SQl add it for you as an identity Column.

vuyiswamb 17 Posting Whiz

What is the Problem ?

vuyiswamb 17 Posting Whiz

Am glad you got your Solution . Mark your Post as Resolved

Kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz
vuyiswamb 17 Posting Whiz

sknake it seems as if they have done a pre-complilation and now he is trying to open those aspx page , but let us make sure.

Vampdee in the File that you have do you have a Solution file(.sln) and do you have a (.cs) or (.vb) files for each aspx page ?

Vampdee commented: .sln is what I was missing +0
vuyiswamb 17 Posting Whiz

Good Day

i want to help you , but i want to laugh at you on the statement you have made

Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

The Version of .NET are not the same and Visual Studios are the same. Visual Studio 2003 was for 1.1 and if you try to open a Project of that kind in VS2008 , i can imagine the Problem you will encounter , the Gap between the Versions is huge. Can you determine what Version of .NET is your Project. because really you cant just open everything aspx file in anytime of version of VS you want.

vuyiswamb 17 Posting Whiz

Now this mean that the PC in other Network have no access to your private Network. So the Problem here is not your Application , the other PC's dont have access to your Private network.

Please Talk to your Network guys about this Issue. if they can ping it from outsite Network , then your problem will be solved

kind Regards

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

ok,Are the Other PC in the Same Network as you are ?

Go to Control Panel --> Administrative Tools-->Internet Information Services

i have Attached a Document , please send me Screenshots as i requested in the document. another this is go to start first

Start--> Run

and Type

Cmd

and click ok

in the cmd type the following

Ping d3ric3-913b8755

and send me the Screenshot of the Results. Please note that you must do this on the other computers not your own. This will tell me if you can see your PC from other PC.

vuyiswamb 17 Posting Whiz

Now this means your URL will be

http://d3ric3-913b8755/fp/

Try it and check if it works

Kind Regards


Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

Right Click on "My Computer" and to Go Properties --> ComputerName, in the Full Computer Name : Tell me what is there

vuyiswamb 17 Posting Whiz

Good Day Derice

The Url will be Formed like this

http://[Machinename]/[Virtual Directory]/

That will be the URL.

Hope this Helps

Vuyiswa Maseko

vuyiswamb 17 Posting Whiz

:)

vuyiswamb 17 Posting Whiz

Well i think if you write you sql nicely and optimized, i don't think you will need a Data-reader. a Data-reader is known with its great performance. But if you have a little data to Display like drop-down , i will go for a data-table or data-set because the different will not matter in the performance , it might 0.01 percent and you will barely see it.

vuyiswamb 17 Posting Whiz

It can be a lot of things, We cant tell because we dont know what are you doing on Page load, mybe if you can tell us a list of things that you do onpage load event and post some sniped code , then we can help you. :)

vuyiswamb 17 Posting Whiz

Why would you wanna do that ?