|
error when i want to delete data at database, i no have link any relationship btw the table.
when i wan delete the data microsoft visual studio 2010 will prompt out the message
No row were deleted.
A problem occured attempting to delete row 8.
Error source: Microsoft.VisualStudio.DataTools.
Error message:The row value(s) updated or deleted either do not make the row unique or they alter multiple row(3 rows).
correct the error and attempt to delete the row again or press ESC to cancel the changes.
this is what error ? why sometime will occur this problem ? if i delete other row that no problem, how to slove ?
|
|
|
|
|
|
ya no have primary key ~ but that is one to many relationship table
|
|
|
|
|
I'm guessing you're using a DataAdapter; don't.
|
|
|
|
|
what u mean by using DataAdapter? i using this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;
using System.Data;
using System.Diagnostics;
|
|
|
|
|
|
LOL, that's everything he's using!
I think a basic class on ASP.Net is in order. I hope somebody isn't paying for this!
|
|
|
|
|
I Higly recommend you to use an Identity column or a UniqueIdentifier Column and set it as Primary Key.
Heap tables with equal row data have this problem due to uniqueness is null and SQL Server nor you could identify which record is fine.
|
|
|
|
|
I am a beginner with asp and I want to start to build professional sites. I had a look at some books and links href="http://www.w3schools.com/aspnet/">
I am more than confused on where to start. I see no structure in my mind
Is there some guidance or strategy, not only a list of technologies available?
Question1:
There is the tool "WebMatrix". It seems to support any needs. Why do I need VStudio then? What is the difference from WebMatrix and VStudio
Question2:
There seems to be a principal difference between "WebPages" and "WebForms (&MVC)". What is this difference
|
|
|
|
|
|
|
|
I want to create yes/no buttons in a popup menu any ideas regarding this?
|
|
|
|
|
Are you looking for simple javascript popup ?
You can try
var r=confirm("Are you sure?");
if (r==true)
{
x="You pressed OK!";
}
else
{
x="You pressed Cancel!";
}
But here you will see OK and cancel instead of yes/no.
|
|
|
|
|
I want code about "how to create setup file in asp.net/c#"
|
|
|
|
|
|
Here's the problem :
When the gvWorkReportList is invisble and gvWorkReportList.FooterRow =null in page loading i get the bellow error :
Quote: System.NullReferenceException: Object reference not set to an instance of an object.
the error is on this part of code :
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
Quote: this is the piece of my code!
<script type="text/javascript">
function KeyDownHandler() {
// process only the Enter key
if (event.keyCode == 13) {
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
}
}
</script>
This doesn't seem like it should be that hard, so if someone could just give me a kick in the right direction, that'd be awesome.
I have used these solution but it dosen't work :
var grid = document.getElementById('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>');
if (grid != null) {
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
}
var grid = document.getElementById("ctl00_ContentPlaceHolderContent_gvWorkReportList");
if (grid != null) {
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
}
var gridFooter = gvWorkReportList.FooterRow;
if (gridFooter != null) {
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
}
|
|
|
|
|
Hi,
if the gridview is invisible i.e. you have made visible = "false" , the control will not be rendered into the client, and object will go null. So, this is what happening in your case.
if you want the gridview to be rendered into the client but not to be displayed, then try by using style attribute like this. style = "display: none;" . if you do so, probably you can access UniqueID .
hope it helps.
Vande Matharam - Jai Hind
|
|
|
|
|
thanks for solution.
But i dont need to get access when it is invisible.
How i can control it if gridview in invisible the the code
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
doesnt run.
Thanks in advanced!
|
|
|
|
|
Hi,
try like below.
var grid = document.getElementById('<%=gvWorkReportList.ClientID%>');
if (grid != null) {
__doPostBack('<%=gvWorkReportList.FooterRow.FindControl("lnkAdd").UniqueID%>', '');
}
hope it works.
Vande Matharam - Jai Hind
|
|
|
|
|
not used!
Cause :
var grid = document.getElementById('<%=gvWorkReportList.ClientID%>');
is not null .
but this code :
gvWorkReportList.FooterRow
is null.
Thnaks in advanced!
|
|
|
|
|
Quote: <big>This doesn't seem like it should be that hard, so if someone could just give me a kick in the right direction, that'd be awesome.</big>
|
|
|
|
|
<textarea id="TextArea1" class="textarea" runat="server" ></textarea>
TextArea1.Value="erromessage <br/>"
after i do research i found set text on text area can be use .value but how about append? anyone know?
modified 19-Apr-13 14:08pm.
|
|
|
|
|
Is the obvious method not working?
TextArea1.Text = TextArea1.Text + "Something else";
|
|
|
|
|
There is no append method on the TextArea.
You would simply create the text you wanted to append, something like:
string current = TextArea1.Value;
string stringToAdd = "The quick brown fox jumps over the lazy dog";
string newString = current + stringToAdd;
TextArea1.Value = newString;
This is, of course, a very simplistic example but should give you the idea of how this works.
You are not appending to the control but to the text within the control.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|