|
Which browser are you using ? It works fine in IE but firefox. It seems detecting text selection in firefox[^] is different. It may fail because of this reason.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
Member 3374813 wrote: var ctrl = document.getElementById("txtTargetText");
where is txtTargetText in your source code?
himanshu
|
|
|
|
|
Replace first line of show function with below code
var ctrl = document.getElementById('<%=FreeTextBox1.ClientID%>');
It might help you.
|
|
|
|
|
Thank you very much.
I have received this error message on the next line of my javascript code
Error:
Can't move focus to the control because it is invisible, not enabled, or of
a type that does not accept the focus. FormBuilder.aspx, line 651 character 9
Line of Code:
ctrl.focus();
|
|
|
|
|
Make sure that your text box control(FreeTextBox1) is enabled and visible. if not then first enable it then set the focus otherwise it gives an error.
|
|
|
|
|
Private Sub DeleteMultipleRecords(ByVal idCollection As StringCollection)
'Create sql Connection and Sql Command
Dim con As New SqlConnection(strConnection)
Dim cmd As New SqlCommand()
Dim IDs As String = ""
For Each id As String In idCollection
IDs += id.ToString() & ","
Next
Try
Dim test As String = IDs.Substring(0, IDs.LastIndexOf(","))
Dim sql As String = ("Delete from Categories" & " WHERE CategoryID in (") + test & ")"
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.Connection = con
con.Open()
cmd.ExecuteNonQuery()
Catch ex As SqlException
Dim errorMsg As String = "Error in Deletion"
errorMsg += ex.Message
Throw New Exception(errorMsg)
Finally
con.Close()
End Try
End Sub
|
|
|
|
|
KhandelwalA wrote: Dim sql As String = ("Delete from Categories" & " WHERE CategoryID in (") + test & ")"
What error are you getting ?
|
|
|
|
|
When I selet a Single row through checkbox then error is :-
Error in DeletionIncorrect syntax near ')'.
When I selet a more than one row through checkbox then error is :-
Error in DeletionIncorrect syntax near ','.
|
|
|
|
|
Dim sql As String = ("Delete from Categories WHERE CategoryID in (" & +test & ")")
|
|
|
|
|
Well, there's many errors here
1 - you asked in the wrong forum
2 - string mashing SQL is never wise
3 - you don't tell us why you think there's an error
I would use the debugger in this situation to read the sql, then look at it and try it in the query analyser to work out what is wrong.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I am using ASP.NET Gridview control with Object Data Source inside an ajax toolkit's update panel.Row Command Event does not get fired for first time after laod. After that it works fine???
|
|
|
|
|
HI,
If I am posting this in wrong category please advice me the right one. I am really not sure...
Here is the problem i have,
I have a PDF document that has
1. intranet link (http://server/guideline.aspx)
2. internet external link (http://www.google.com)
3. physical link to a file in a server (file:\\localserver\shared\guideline.html)
When I open this PDF file in adobe all of the above 3 links works very fine and take me to the right page/document.
When I open this PDF file in IE all of the above 3 links wokrs very well and takes me to the right page/document.
But in my .NET 2.0 C# application I am trying to open this up by a aspx page using iFrame, it opens up very well and first 2 links works very well. When i click the third link I am receiving "Page cannot be found" error. I checked the property of this page and looks like IE is trying me to open up
http://localhost/localserver/shared/guideline.html
instead of
file:\\localserver\shared\guideline.html
I spent 3 days finding a answer to this problem But no luck.
Here is the code in side aspx page:
<body id="bdContent" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" runat="server">
<form id="Form1" method="post" runat=server >
<iframe id="frmBrowser" marginWidth="5" hspace="0" vspace="0" src="medseed.htm"
width="100%" height="100%" runat="server" scrolling="auto">
</iframe>
</form>
</body>
This is the code I am using to load the PDF file dynamically,
string script = String.Format("<script>document.all.frmBrowser.src='{0}';</script>", url);
RegisterStartupScript("scriptBreakframe", script);
Here url is the the actual URL for PDF something like this http://localhost/workingproject/guidleine/linksfile.pdf
Anyone faced this problem before?? Please please.. anyone know the solution?
THanks in advance for your valuable time.
Cheers
Renu
|
|
|
|
|
Please shed some light.. please please...
Renu
|
|
|
|
|
hai to all,
i m using
a href="javascript:void(0)" onClick="javascript:history.back();"<< Back
this code to redirect back.In works fine in IE7
But it not work in IE6
please any one can help?
thanks
elango
modified on Wednesday, June 24, 2009 1:39 AM
|
|
|
|
|
try this
<a href="javascript:void(0)" onclick="javascript:history.back();" target="_search" type="text/html"> Back </a>
|
|
|
|
|
i'm trying a simple incremant in asp.net using a thread, in the debug mode the values are correct and assigned to the label1 properly. but at the end th label value is not changed as it showed in the debugging mode.
public delegate void mydel(int y) ;
public mydel m;
protected void Button1_Click(object sender, EventArgs e)
{
if (IsPostBack)
{
Thread thrd = new Thread(new ThreadStart(dothis));
thrd.Start();
}
}
private void dothis()
{
for (int x = 0; x < 5; x++)
{
m= new mydel(update);
m.Invoke(x);
}
}
public void update(int a)
{
this.Label1.Text = a.ToString();
}
what might be the problem.
|
|
|
|
|
The basic issue is your understanding of ASP.NET. You basically have a race condition. If your page lifecycle ends before the threads have run, they will die.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i want to get distinct values of a column in datatable in asp.net. is it possible and how?
thanks
|
|
|
|
|
much clearly explanation would help our experts to give accurate answer....
|
|
|
|
|
i have a datatable "TableA" with columns
CompanyName
EmployeeName
EmployeeSalary
CompanyName gets repeated in the datatable i want company name in some other datatable say "TableB" and company name should be only once in the column. i want to run query on TableA.Select("Query"); to get unique CompanyName and add these rows to TableB. All i know but wt i nyd to know is wt shd be d query for it. i tries select distinct CompanyName but it thorows an exception
|
|
|
|
|
Please try this [^]
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
If you are using .net framework 3.5 then use LINQ as follows
var query = (from c in dt.AsEnumerable() select new { FirstName = c.Field<string>("FirstName"), LastName = c.Field<string>("LastName") }).Distinct() ;
It will give you distinct values.
himanshu
|
|
|
|
|
im working on ADO.net not LINQ
|
|
|
|
|
Hi Aijaz,
But if you are working on framework 3.5 then you can use the code i have posted above.
If not then you might be need to create dataview and then filter rows from there.
himanshu
|
|
|
|
|