|
Hi,
you could create your special stream reader that does exactly that, or there could be something very special about your file (not sure what). To make sure, use a hex editor/dumper to look at the first few lines of data.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hey does any body knows how to write a javascript code using the code behind in .NET
for example i use Response.Write("<script language='javascript'>alert('x');</script>");
It works but am searching for another method that i could use
modified on Wednesday, July 22, 2009 5:58 AM
|
|
|
|
|
It'll work every time.Can you give detail when its not working
Cheers!!
Brij
|
|
|
|
|
I edited the the question. becuase yes it works but the problem that am facing with it is that i am using the following Master Page --> Tab --> Grid -- > Text Box
An doing the following
response.write("document.getElementById('"+txt.Text+"').focus();");
it tells me that object is null and gives a js Error
I am using this method on page load so directly the focus will be on that textbox. The JS code that i wrote works fine if i paste it in the URL tab so there is no problem with syntax.
|
|
|
|
|
response write writes the code to the begining of the page. Pages are rendered by browser from top to bottom. That means when you are trying to get an object that object is not still created. So instead of response write use Page.ClientScript.RegisterStartupScript method.
|
|
|
|
|
Could you explain more about this method
|
|
|
|
|
|
It worked fine when i need to know the value of that text box, but when i use the focus() method it gives me a JS error which says that the control either is invisible or not enabled or doesnot accept focus :S
|
|
|
|
|
Control or one of the parent controls that contains control might have the visibility style set to hidden, check if.
|
|
|
|
|
No none of the parents is invisible because when this code is not inserted the whole page appears normally
|
|
|
|
|
Have you tried the Java forumn?
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
i did not understand your question you mean have i tried to use form in java script or discussion forms in js
|
|
|
|
|
Is your problem solved.Register javascript mathod using Page.ClientScript.RegisterStartupScript
and if you using scriptmanager on the page then use this mathod
ScriptManager.RegisterStartupScript
Cheers!!
Brij
|
|
|
|
|
it worked in getting the value of text box but when it came to focus method it gave an error
|
|
|
|
|
There may be certain things
First check whether your code below is able to get the object of control document.getElementById('"+txt.Text+"')
your Textbox is server side or clientside control?
Cheers!!
Brij
|
|
|
|
|
It is a server side but txt.Text is assigned to have this value TEXTBOX.ClienID
|
|
|
|
|
Hello,
I have developed an application which reads from, writes to xml files and displays the data on the UI.
This application is used by many users and so an auditing functionality is required.
How do you recommend to do this? should the audit be written into a separate centralized xml file? remember that this audit file will have to be used to retrieve data to show the audit details.
Thanks
|
|
|
|
|
Hi,
I would suggest using a database instead of xml. Advantage of this approach is, that it is faster than xml, supports multi-threading and user-isolation and provides functionalities to analyse the data within. Using Xml means that you have to implement this all by yourself. Working with xml is slow so this can become a bottleneck for your application.
Regards
Sebastian
|
|
|
|
|
Hi,
Due to business rules, database should not be used.
Thanks
|
|
|
|
|
You need to raise with your business that this rule will cost a lot of money to work around, and does not gel with an audit requirement functionality because of the lack of transactional constraints in your XML handling.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hi..
i m using try command like this
try
{
// Statement which can cause an exception.
}
catch
{
// Statements for handling the exception
}
when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
|
|
|
|
|
mjawadkhatri wrote: when perform catch statement then progrm not read next line go to try statement which can cause an exception
how can i do???
Can you explain a bit better what your asking?
Your program will execute the code within the try block, if an error occurs it will 'jump' to the catch block and execute the code there. It will not return to the try block.
If there is any code you always need/want to be executed use a 'finally' block.
|
|
|
|
|
I saw your Example code in Coding Horrors lol
I dont know what your problem is but its not done that way, what is the is of using the catch keywork and not use it.
try
{
}
catch(ApplicationExeption ex)
{
}
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Not sure what it is you want, however:
1.
there is no simple equivalent to ancient Basic's "On Error Goto Next"
2.
if your try block contains a loop, and fails in one iteration of said loop, anything in the try block is aborted, also the loop.
if you want the loop to continue with the next iteration, you have to turn things around, and put the try-catch construct inside the loop.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|