|
I 'm trying to add some free web services to my asp.net website.I'm getting Error......System.Net.WebException: The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ).
What do i need to do access free webservices.....Can any one provide me some sample code .
|
|
|
|
|
|
I tried it on google..I know i have to pass proxy server credential but dont know how to pass..If u know then plz tell me..
|
|
|
|
|
|
hiiii
dear its still not workin.
i just want to multiply the two textbox values n show this value
in third textbox during runtime.can u solve the problem.....
thnks...
|
|
|
|
|
Are you writing the code in some button click event or in textbox change event.....
|
|
|
|
|
Don't open new threads,continue writting in your previous which you created.
Check this link[^]
I suggest you to buy programming book and to read it.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
m doin this in a function n then calling this function on button click event....
|
|
|
|
|
function or method.... Because this is a simple and working code which is sent by our experts.... it sounds odd when it is not working for you.... kindly send your function and where you are calling that fucntion.....
|
|
|
|
|
ok this is the full code:
private void InsertInfo()
{
SqlConnection conn = new SqlConnection(GetConnectionString());
string sql = "INSERT INTO PurchaseProduct(ProductCategoryId,ProductID,ProductName,BrandName,Price,Quantity,TotalPrice)values(@Val1,@Val2,@Val3,@Val4,@Val5,@Val6,@Val7)";
try
{
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.Parameters.AddWithValue("@Val1",Txtcatid.Text);
cmd.Parameters.AddWithValue("@Val2",Txtproductid.Text);
cmd.Parameters.AddWithValue("@Val3",Txtproductname.Text);
cmd.Parameters.AddWithValue("@Val4",Txtbrandname.Text);
cmd.Parameters.AddWithValue("@Val5",Txtproductprice.Text);
cmd.Parameters.AddWithValue("@Val6",Txtproductquantity.Text);
int Total = int.Parse(Txtproductprice.Text) * int.Parse(Txtproductquantity.Text);// (Convert.ToInt32(Txtproductprice.Text) * Convert.ToInt32(Txtproductquantity.Text));
string total = Convert.ToString(Total);
Txttotalprice.Text = Total.ToString();
cmd.Parameters.AddWithValue("@Val7",Total);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
}
catch (System.Data.SqlClient.SqlException ex)
{
string msg = "Insert Error:";
msg += ex.Message;
throw new Exception(msg);
}
finally
{
conn.Close();
Txtcatid.Text = "";
Txtproductid.Text = "";
Txtproductname.Text = "";
Txtbrandname.Text = "";
Txtproductprice.Text = "";
Txtproductquantity.Text = "";
Txttotalprice.Text = "";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
InsertInfo();
}
|
|
|
|
|
My money is on either Txtproductprice or Txtproductquantity not containing a valid integer.
|
|
|
|
|
pariofshona wrote: ...TotalPrice)values...
Should be like this ...TotalPrice) values...
pariofshona wrote: int Total = int.Parse(Txtproductprice.Text) * int.Parse(Txtproductquantity.Text);// (Convert.ToInt32(Txtproductprice.Text) * Convert.ToInt32(Txtproductquantity.Text));
string total = Convert.ToString(Total);
Txttotalprice.Text = Total.ToString();
cmd.Parameters.AddWithValue("@Val7",Total);
replace with
int Total = int.Parse(Txtproductprice.Text) * int.Parse(Txtproductquantity.Text);
string total = Convert.ToString(Total);
Txttotalprice.Text = total ;
cmd.Parameters.AddWithValue("@Val7",total);
I Love T-SQL www.aktualiteti.com
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
i dono who voted the above answer to remove.... But who ever it might be the answer is,
pariofshona wrote: private void InsertInfo()
this is method not a function
pariofshona wrote: int Total = int.Parse(Txtproductprice.Text) * int.Parse(Txtproductquantity.Text);// (Convert.ToInt32(Txtproductprice.Text) * Convert.ToInt32(Txtproductquantity.Text));
string total = Convert.ToString(Total);
Txttotalprice.Text = Total.ToString();
you can directly assign,
int Total = int.Parse(Txtproductprice.Text) * int.Parse(Txtproductquantity.Text);
Txttotalprice.Text = Total.ToString();
|
|
|
|
|
Someone voted as Bad Answer to mine answers too
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
ya, this is one of the bad thing to hide thier names and vote.....if they are ready to prove that the answer is bad they can give the correct answer and prove their talents in front of our experts.....
|
|
|
|
|
It comes to something when someone who can't even manage to add the values of two numbers in textboxes is voting everyones answers as cold because they can't figure out the simplest of tasks!
|
|
|
|
|
Some kind of people are like 'chicken', but this is foum in which we all trying to help each-other.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Blue_Boy wrote: but this is foum in which we all trying to help each-other.
|
|
|
|
|
please dont post your question again and again that too with a change of name......
|
|
|
|
|
Pl. avoid spinning a new thread for the same post messing up the forums.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
hiii
i hav written the code but still it is not showin the value
in the textbox when i run the program.I want that it calculates the value of two textbox n shows the result in third textbox.
the code is:
int result = int.Parse(TextBox1.Text) * int.Parse(TextBox2.Text);
TextBox3.Text = result.ToString();
|
|
|
|
|
TextBox3.Text =Convert.ToString(int.Parse(TextBox1.Text) * int.Parse(TextBox2.Text));
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Blue_Boy wrote: TextBox3.Text =Convert.ToString(int.Parse(TextBox1.Text) * int.Parse(TextBox2.Text));
this is same as,
int result = int.Parse(TextBox1.Text) * int.Parse(TextBox2.Text);
TextBox3.Text = result.ToString();
|
|
|
|
|
So what is happening? Is an exception being thrown?
|
|
|
|
|
Did you try to debug it.Is it value is properly assigned to the textbox.Any error or exception?
|
|
|
|