|
onchange event fires only when you changed the text and then lost the focus from the textbox.
It will not fire every time you press the key. It will fire only once, for text change in the textbox, after loosing focus.
If you wish to handle event as soon as user types, use on KeyPress event instead.
Hope this will help.
|
|
|
|
|
Anurag Gandhi wrote: onchange event fires only when you changed the text and then lost the focus from the textbox.
Yes that is the expected behavior but it is not happening.
|
|
|
|
|
Hi,
I am working on the C#/.NET application where in i need to get Current Identity value of the table using LINQ. Or else I can use the sql query to get the task done by either using
var num = DataContext.ExecuteCommand("Select IDENT_CURRENT ('table')");
By using this above code, i am getting the value = -1.
or
var num = DataContext.ExecuteQuery(("Select IDENT_CURRENT ('table')");
By using the above code, i am getting an exception "Specified cast is not valid." and the value remains NULL.
Correct me if i am doing something wrong. let me know if there are any better ways to do this task.
Thanks for ur help in advance.
|
|
|
|
|
Are you inserting data through Linq with SP OR adding object?
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
I am not inserting any data. I just want to have the Current Identity value of the table. so that i can make use of it for displaying it to the user.
|
|
|
|
|
I think you can use max id of Table.
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Thanks for the answer.............but
i have a scenario where Lets say presently last column id value is 30, but there were 4 records after Column id = 30. but now they are deleted from the table. so i need to the column id value = 34 when i execute the query for the Current Identity value but not the value = 30.when i use max(id) i get 30 which is not what i am looking for.
|
|
|
|
|
The value returned from ExecuteCommand is the number of records modified by the command (in your case, you are not modifying records). See here. You probably want ExecuteQuery.
EDIT: I see you are using ExecuteQuery in your second example. I didn't notice that, as I was ignoring that line due to the syntax error you have there (extra paren).
Driven to the ARMs by x86.
|
|
|
|
|
See the documentation for ExecuteQuery. It will return a collection, not an individual number. You should also be specifying the return type. Get the first item from the collection and you should be good to go.
Driven to the ARMs by x86.
|
|
|
|
|
You could also try "SELECT @@IDENTITY"
But what you've got is already correct (for SQL 2005, at least), so it may be a LINQ problem, not a database problem (and certainly nothing to do with asp.net).
You might have better luck in the LINQ forum.
EDIT: Ah. You already moved there.
|
|
|
|
|
Hi
I have a situation where i need to upload many files at a time. The number of files can be any thing like 1, 100, 144, 1000, or 500 or any number. a user will come he will select a folder the uploader should loop the folder and upload every file that is present in the folder. Does there lie a solution to this problem in asp.net.
|
|
|
|
|
S_Aijaz1 wrote: a user will come he will select a folder the uploader should loop the folder and
upload every file
I don't think this is possible directly with asp.net. Security issue in web.
However, you can achieve this using Flash, silverlight or ActiveX in your web application.
I would suggest, search solution(s) in those area.
|
|
|
|
|
what security issues are there?
|
|
|
|
|
I would not allow any browser to read my hard drive(s)/Folder and send the file information to the server.
It is ok for me to upload the selected file based on need AND with my permission. But if anything is getting uploaded, i should be properly aware of them.
Please note and every user is not a developer and they may or may not be aware of what your site is doing.
I hope this answers your question. If not, you may google it. A lot of thread has already discussed on "File Upload security issue".
|
|
|
|
|
Check out this JQuery Plugin ('Uploadify'): http://www.uploadify.com/demos/[^]
It still needs to you to select all files in the folder and may not be able to recursively select folders in it.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Hi,
I am implementing JQUERY Datepicker with JQuery Mask in one user control also i have custom js page,in that page only i am calling .mask function. It is working fine but when i put this user control inside update panel, when page loads fist time i am able to see my mask but when i am trying to delete the date by that time mask also deleting. After that i put my code inside function pageLoad(sender, args)
but still i am facing same problem.
If you any one is having solution for this please let me know.
|
|
|
|
|
Good day
I am using Visual Web Developer 2010 Express to develop a website.
I am using a FormView to edit and display records. I am trying to format the layout of the FormView so that I can arrange my data in the FormView in columns.
Something like:
Hosp Number: 100000000
Last name: Mouse First name: Mickey
DOB: 01/01/1923 Admission: 06/06/2011
I can do it quite easily using Tables, but I see that most people suggest moving away from using tables to do layout and rather use css based tableless design.
I am a bit stuck now. Have done some searching, but even Microsoft’s examples of FormViews use tables.
Does anyone have an example for me or a URL where I can go and look?
Thank you for the help.
Kobus
|
|
|
|
|
|
Thank you
This looks like it can help me.
Kobus
|
|
|
|
|
hi
i have a xml file and i would like to read and write data in XML file.i will use it in my news scroll.
thanks
|
|
|
|
|
|
Hi,
How to open pdf file in the new tab or new browser in asp.net. Right now I can open the pdf file in another window but I want to open it in browser or in new tab.
The code that works to open pdf in new window is shown but I want it in new browser..
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=a.pdf");
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.ContentType = "application/pdf";
StringWriter stringwrite = new StringWriter();
HtmlTextWriter htmlwrite = new HtmlTextWriter(stringwrite);
repeater1.RenderControl(htmlwrite);
StringReader sr = new StringReader(stringwrite.ToString());
Document pdfDoc = new Document(PageSize.A4, 50f, 50f, 40f, 40f);
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.NewPage();
pdfDoc.Close();
any ideas?
suchita
|
|
|
|
|
As per my understanding, your page is may be open on any link so set link attribute target=_blank .
OR please explain, how you are opening page?
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Hi,
Yah its in different window like when we open the pdf file from the desktop. But is there any way i can have it in the new tab of the same browser or in different browser ?
suchita
|
|
|
|
|
I didn't got your question, Are you opening browser in Windows desktop application on Browser Control?
OR
Are you using Web application then you are trying to open windows/Tab?
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|