|
|
samrat.net wrote: is there any process to get back the autoid when use ExecuteNonQuery( )
ExecuteNonQuery() returns the number of rows affected and nothing else.
samrat.net wrote: i don't want to use max(autoid) on the that table, because it can result on concurrency problem.
you can use
SELECT @@IDENTITY as Value .
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
I have been using Crystal report in my web applications till now.
In msvs 2008 I found Microsoft ReportViewer control.
can you tell me how to use it.
Thanks
Hemant Thaker
By:
Hemant Thaker
|
|
|
|
|
I just got this from our team lead. Anyone know how to deal with this?
Ok, so just had some fun because I forgot to search and remove any 'debugger;' and 'console.log' commands from our JS before releasing the code. Basically when firebug is not active in the browser, the debugger and console.col statements cause errors in the code and code doesn’t execute.
I was going to suggest that we write our own methods which we use like top.log(), which would handle the case when a browser doesn’t have firebug running, but its actually just bad practice because we will then be giving other people insight into our code, or allowing them to see our internal debugging details on the live site which isn’t bad, but also isn’t great.
|
|
|
|
|
Get firebugx.js here[^], and link it in on production - it turns the console stuff into do-nothing calls. And don't worry about giving me insite into your code, i can attach a debugger regardless.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
|
Hi everyone,
I need to copy the selected text(in website) to Notepad automatically. The details as follows:
(1) I select the particular paragraph or sentence or word in the website.
(2) Then, I press the Ctrl+C
(3) When, I open the Notepad or msword or wordpad, the copied text need to pasted in the notepad or msword or wordpad automatically. I need the javascript to do this.
please help me.
Thanks in Advance,
J. Mohan
J. Mohan
|
|
|
|
|
I strongly doubt that is possible even with an add-on like ActiveX as it compromises security.. Definitely not achievable in Javascript, but you can copy text to the clipboard with Javascript; take a look at this article, which may be of use
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
jmohan wrote: (3) When, I open the Notepad or msword or wordpad, the copied text need to pasted in the notepad or msword or wordpad automatically. I need the javascript to do this.
I shudder to think of what would make you want such a thing, but no - you can't do that with Javascript. If you could do that with JS, you could also paste commands into a command window should the user open one, or into the Run box if that was opened. Security would be a joke.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
i am trying to make a Random css/java popup.
i got the popup working but, i want to make it scroll with the page, and make it so it is center (so when you don't scroll it isn't in the center of the page, but in the center of the browser)
here is the code i am working with, what makes the popup random is in asp
css:
#blanket {
background-color:#111;
opacity: 0.65;
position:absolute;
z-index: 9001;
top:0px;
left:0px;
width:100%;
}
#popUpDiv {
position:absolute;
background-color:#eeeeee;
width:300px;
height:300px;
z-index: 9002;
}
here is the java
java:
function toggle(div_id) {
var el = document.getElementById(div_id);
if ( el.style.display == 'none' ) { el.style.display = 'block';}
else {el.style.display = 'none';}
}
function blanket_size(popUpDivVar) {
if (typeof window.innerWidth != 'undefined') {
viewportheight = window.innerHeight;
} else {
viewportheight = document.documentElement.clientHeight;
}
if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
blanket_height = viewportheight;
} else {
if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
blanket_height = document.body.parentNode.clientHeight;
} else {
blanket_height = document.body.parentNode.scrollHeight;
}
}
var blanket = document.getElementById('blanket');
blanket.style.height = blanket_height + 'px';
var popUpDiv = document.getElementById(popUpDivVar);
popUpDiv_height=blanket_height/2-150;
popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_pos(popUpDivVar) {
if (typeof window.innerWidth != 'undefined') {
viewportwidth = window.innerHeight;
} else {
viewportwidth = document.documentElement.clientHeight;
}
if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
window_width = viewportwidth;
} else {
if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
window_width = document.body.parentNode.clientWidth;
} else {
window_width = document.body.parentNode.scrollWidth;
}
}
var popUpDiv = document.getElementById(popUpDivVar);
window_width=window_width/2-150;
popUpDiv.style.left = window_width + 'px';
}
function popup(windowname) {
blanket_size(windowname);
window_pos(windowname);
toggle('blanket');
toggle(windowname);
}
finaly, the html
html:
<body onload="popup('popUpDiv')">
<div id="blanket" style="display:none;"></div>
<div id="popUpDiv" style="display:none;">
<a href="#" onclick="popup('popUpDiv')">Click Me To Close</a>
<font color="#FF0000"> Random event! o: </font>
</div>
i hope some one can help me with this o:
|
|
|
|
|
Hi Guys,
Just wondering. Is there a way or a tool to trace a certain website if what are the webservices and other aspx files been used?
hifiger2004
|
|
|
|
|
No, you need to know them in advance.
|
|
|
|
|
I'm using visual studio 2005 and ajax extension 1.0 and also I installed ajax control toolkit[downloaded from www.asp.net].when i added to toolbox,it shows an following error.
There was an error loading types from assembly ‘C:\Program Files\Microsoft ASP.NET\ ASP.NET 2.0 AJAX Extensions\AjaxControlToolkit\Binaries\AjaxControlToolkit.dll’
‘Could not load file or assembly ‘System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublickeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.’
Any one known about this issue,help me
Thanks in advance
Known is a drop , Unknown is an Ocean
|
|
|
|
|
ganeshMohan wrote: I'm using visual studio 2005 and ajax extension 1.0
Fortunately, there is a forum for that[^].
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Hello All,
In my program, i want to use a Java servlet to response to users' web request, in which the info submitted by users is write into a remote MySQL database. To this end, I have to establish a connection to the MySQL database firsts. I do this using the following code and can compile it sucessfully. It is strange to me that the code can be compiled successfully,though there is actually not mysql-connector-java-###-bin.jar package installed/copied on the Linux box.
import java.sql.*;
import java.io.*;
import java.util.*;
public class welcomeyou extends HttpServlet
{
public void doGet(HttpServletRequest rqu, HttpServletResponse resp)
{
String driver="com.mysql.jdbc.Driver";
String url="jdbc:mysql://192.168.1.1/DatabaseName";
String databaseuser="root";
String password=""
Connection con = null;Statement smt =null;
Resultset rs=null;
try
{
con=DriverManager.getConnection(url, databaseuser, password);
smt =con.createStatement();
}
catch(SQLException E)
{
System.out.println("SQLException:" + E.getMessage());
System.exit(0);
}
}
}
I cannot provide error message, since the statement System.out.println("....) could not display error message on the screen in this circumstance.(Could anybody tell me how to do this )
I wonder if the statement 'import java.sql.*;' means import library from mysql-connector-java-###-bin.jar
Please help me, this problem has stuck me for a long time.
thanks
|
|
|
|
|
Hi there.
At times I see a hidden input tag in *.aspx websites.
Something like this :
<input type="hidden"
name="__VIEWSTATE"
id="__VIEWSTATE" value="/wEPDwUKMTA0ODU1ODQ1Nw9kFgICAQ
9kFgICAQ9kFgJmD2QWBAIBDw8WAh4HVmlzaWJsZWdkZAIDDw8WAh8AaGRkGAEFHl9fQ2
9udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBRJjdGwwMyRJbWFnZUJ1dHRvbjFpjYePDwA
+Be/n+ZqTa2h71d92Vg==" />
what's that?
Thanks in advance
|
|
|
|
|
|
Hi,
I am using .Net 2008 for my web applications.
Crystal Report is my cup of tea.
The problem I am facing is that.....
I am loading crystal report in a web form through button click,
once my crystal report is displayed in crystal viewer and if I
do some changes like reduce report size from 100 % to 50 % etc , It leads me to a screen with textboxes for giving server name , etc.
please suggest me to help me out.
thanks
Hemant Thaker
By:
Hemant Thaker
|
|
|
|
|
Hi,
I am developing a web application in ASP.I want to copy file from one server to another using VB Script.You can say server machine(application is hosted on it) to client machine.Anybody know how to do this.
my client machine path is like http://machineIP/foldername/filename.doc
please reply me!
|
|
|
|
|
|
How to find the no. of days in a Month in Javascript but Month no. should be 1-12 not in 0-11
|
|
|
|
|
Can you explain your situation in more detail, perhaps with a code sample?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
.NET- India wrote: How to find the no. of days in a Month in Javascript
Create a Date object for the first day of the month, and one for the first day of the next month. Use the valueOf method to get the values as milliseconds, subtract them and divide the result by 86400000 to get the number of days.
.NET- India wrote: but Month no. should be 1-12 not in 0-11
The Date object uses the values 0-11 for month, and there is nothing that you can do about that. You have to translate the value by adding or subtracting one.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi
I'm using the 'file'' input control tag (HTML) – this represents the
"Browse..." HTML control on internet browsers.
I'm not using this control for its conventional use – to upload a file to a
server, rather – I use it to get the path of a file on a network share – in
order to save typing time for the user.
For example on Windows or Linux when browsing to a network server to get a
file – the result is: \\SomePC\SomeShare\SomeFile.ext
On Mac – Leopard/Tiger – we will see something like:
/Volumes/SomeShare/SomeFile.ext
Our problem is that we need the file server name – which the Mac seem to
automount under the /Volumes directory, I would appreciate your
comments/idea on how to get the full path instead of the mounted path
returned to the server by the browser.
|
|
|
|
|
Short answer: you can't.
Long answer: you get what the browser gives you and have to accept this due to the non-standard use of the file element.
|
|
|
|