|
Troll alert.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
anupamwb wrote: i did not get any dll link,can any anyone send such dll link or told me how to find dlls from this site
No. What goods do you have to exchange in return?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I want to get the security permissions of a file in C#, Can anybody help to get worked out this ? What are the classes shall We use to get or set the Security Permissions of a file using C# code.
Thanks in Advance.
Mar_Tech 
|
|
|
|
|
|
Thank you very much for response.
This is applicable to .Net 2.0, but I need the solution for .Net 1.0, Can anybody help?
Thanks in Advance,
mar_tech
|
|
|
|
|
Can you tell me why the script doesn't work well. If it saved into html file it works fine, but the same script from the program doesn't send anything. I looked with a sniffer, the packets doesn't routed.
Thanx.
webBrowser1.DocumentText =
"function Sub1() {alert('123');document.getElementById('form1').submit();}" +
"" +
" "ENCTYPE=\"multipart/form-data\" METHOD=POST>" +
"" +
"" +
"" +
";" +
"";
webBrowser1.Navigating +=
new WebBrowserNavigatingEventHandler(webBrowser1_Navigating);
webBrowser1.Update();
private void webBrowser1_Navigating(object sender,
WebBrowserNavigatingEventArgs e)
{
System.Windows.Forms.HtmlDocument document =
this.webBrowser1.Document;
if (document != null)
{
webBrowser1.Select();
e.Cancel = true;
webBrowser1.Show();
}
}
|
|
|
|
|
I'm not an expert, but that looks a bit strange to me :
<body önload="Sub1()">
|
|
|
|
|
I have a SQL Server 2000 database which my C# application is storing data into. I would like to know if there is any real benefit using stored procedures from my C# code than using straight SQL text. I know there is probably a lot of benefit using a stored procedure if what I want to accomplish is very complicated. So here is my questions....
Is there any real performance gain to use a stored procedure if my SQL text is a simple 'select', 'update', 'insert', or 'delete' statement(meaning the SQL text only involves one table and is very basic)?
Is there any real performance gain to use a stored procedure if my SQL text is a 'select' statement that has around 3 'inner joins'?
Thanks
Chris
|
|
|
|
|
There are two things to consider: performance and flexibility. For performance, you may see a slight improvement with SPs because SQL Server can "compile" them ahead of time. When performing ad-hoc queries, SQL Server must "compile" them every time (with some exceptions). If you are running simple selects then you probably would never notice an improvement.
When doing simply selects, your main benefit comes from flexibility. SPs allow you to quickly and easily change the underlying T-SQL code (whether it's a simple select or something more complex) *without* having to re-compile your .Net code. It is possible to "store" the T-SQL code in a config file. This would still allow you to change your code without recompiling your binaries, but SPs are generally the preferred method.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
In addition to what has already been stated, security is another reason to use stored procs over in-line SQL. Unless you have strong, bullet-proof validation, using in-line SQL opens your app to SQL injection attacks. Stored procs can also be secured at the server so if your app uses Windows authentication to grant access to SQL Server a user who is not authorized won't be able to run the proc, even if not using Windows authentication, different users, or groups of users can be secured.
only two letters away from being an asset
|
|
|
|
|
I want to know which button is clicked on datalist item command
i am having three buttons in itemcommand .
how can i get the click event of particular button?
|
|
|
|
|
Hi there,
There are probably a few ways for doing that.
I use a switch:
protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e)
{
switch (e.CommandName)
{
case "Edit":
//do somthing
break;
case "Delete":
//do somthing
break;
}
}
Hope it helps.
Danny
|
|
|
|
|
it worked .
Thanks Danny , keep the good words going on.
|
|
|
|
|
DataListCommandEventArgs e
using e.commandName we can check for button command event.
|
|
|
|
|
Hi danny
Give the Command name to the buttons
and check the Command name in ItemCommand Event like this
if(e.Commandname=="Add")
{
//Do Something here.
}
|
|
|
|
|
Hi All,
is there a way to change WSDL file generated by .NET 2.0 for web services, when i click on "Service Description"? (https://localhost/MyService/MyService.asmx?WSDL)
I want to add a comment to the top of generated WSDL after <?xml version="1.0" encoding="utf-8" ?> and before <wsdl: definitions xmlns: soap="http://schemas.xmlsoap.org/wsdl/soap/" ...
|
|
|
|
|
hi
can u pls help me how to trace the DataGridview's cell click event.
thnks
senthil
|
|
|
|
|
Hi,
Can you please elaborate that exactly what you want to do; because datagridview does have a CellClick Event.
Regards,
Ujjaval Modi
Manpower moves wrenches, horsepower moves cars, and the power of the mind moves the world.
|
|
|
|
|
hi
i have a datagridview contrl which populates a column from table thru dataset.
when i click, or browse through arrow keys , the current cells items should be shown in textboxes for edition.(the selected cell item is key value, i pass it to storedproc and select its other fields to show in textboxes) i had did this through a button click as follows
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
dsGridToTxtBx = obj._selectGridCellAreaDetails(<big>DataGrdVw1.CurrentCell.Value.ToString(</big>));<br />
{<br />
AreaIdValue = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[0].ToString();<br />
<br />
txtAreaName.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[1].ToString();
txtRegion.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[2].ToString();
<br />
}<br />
}
also i tried like this but this doesnt works?
private void DataGrdVw1_CellClick(object sender, DataGridViewCellEventArgs e)<br />
{<br />
string CurrentSelValue;<br />
CurrentSelValue = DataGrdVw1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();<br />
txtAreaName.Text = CurrentSelValue;<br />
}
i would thank if anybody gives me solution
kssk
kssk/div>
|
|
|
|
|
Hi,
Not sure why the following line gives an error mentioned below.
if (dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value = CheckState.Checked)
{
}
Cannot implicitly convert type 'object' to 'bool'. An explicit conversion exists (are you missing a cast?)
Even tried == instead of = but still does not work.
Thanks
|
|
|
|
|
well it definately wont work with one = as thats assignment. With 2 == i'm pretty sure you'll see a different error message saying that there is no implicit conversion to CheckState for the value of dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value
try using the debugger to see what the value of dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value actually is.
|
|
|
|
|
if (dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value == CheckState.Checked)
{
Operator '==' cannot be applied to operands of type 'object' and 'System.Windows.Forms.CheckState'
|
|
|
|
|
You need to cast the value to a bool before you can test it. Value is an object type, so you need to do this
if (Convert.ToBoolean(dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value) == CheckState.Checked)
|
|
|
|
|
if (Convert.ToBoolean(dgvSecurityPricing.Rows[e.RowIndex].Cells["AcceptBestPrice"].Value) == CheckState.Checked)
I doubt CheckState will be able to equate a boolean any better than object would.
|
|
|
|
|
J4amieC wrote: I doubt CheckState will be able to equate a boolean any better than object would.
Ummm - but CheckState.Checked is a boolean. Have I missed some subtlety in the original post?
|
|
|
|