|
Hi,
Currently I am accessing the selected 'record' in the DetailsView by using detailsView.SelectedValue, which returns an object, specified by the DataKeyNames property. What i would like is to get the selected record as an object (not just the primary key, as is the case with detailsView.SelectedValue).
It should be possible to do this. Point in case; the ObjectDataSource specifies a DataObjectTypeName property. When this property is set, the update and select methods recieve this object as a parameter when fired.
Currently, what I am doing is:
1. get the primary key through detailsView.SelectedValue,
2. get a DataSet from the back end, using the primary key
(the DataSet contains one row)
3. convert the DataRow to Business object (using reflection).
4. ...complete operation
Any help/advice is appreciated.
|
|
|
|
|
hai all,
In a textbox if i type first letter(for ex:say 'a').. it should display all the letters starting with that alphabet.. how can i do that?? thanks in advance
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
'that' alphabet ? How many are there ?
To do this in ASP.NET, you need to handle the key pressed event of the text box input control, and then write javascript to insert the text you want. Or, you'd have to do a postback, which would be nasty
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
1. Capture the key press event in javascript.
2. Using AJAX( go for XMLHTTP object of browser) sent the character you have pressed to the AJAX file(AJAX engine)
3. Get the result as string with some delimeter in it.
4. Separate the result
5. Show results in a DIV with proper style.
example:
Suppose you have typed 'a'
using AJAX you may send a HTTP get request like this
http://loclhost/AJAXFile.aspx?char=a
to get a result string this way ...
'aasha|abbas|arindam|asif'
Now manipulate this string using Javascript and build a DIV to display this resultset.
Hope this helps ...
Thanks,
Arindam D Tewary
|
|
|
|
|
Wow!!! Are you using aircraft to reach your office?
|
|
|
|
|
ROTFL - well said.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
sorry guys if it was not helpful .. but what I have suggested is a good option if the values to be populated dynamically from the server.
Anyone can point out for a better way !!!!
Indeed a bit javascript is enough if the set of values to be populated(on key press event) is static and if can be stored in client side( preferebly in an array).
Any feedback would be appreciated !!!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Yeah, the AJAX thing will work, but it does smell like potential overkill, especially if the values are known when the app starts, and if he just wants to get the alphabet back.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Graus !!!
Thanks,
Arindam D Tewary
|
|
|
|
|
I dont share my things to others !!!! my aircraft is my personal No space for others !!!!!
Thanks,
Arindam D Tewary
|
|
|
|
|
It was a kidding. :-> JavaScript will serve that purpose. It is simple and it is the right way
|
|
|
|
|
The best thing is to write "the solution" here in the forum !!!
Only a single line (what you have adviced me now) could have been enough ... lets put the possible solution together here .... and lets allow the person to choose the best one ...
What do you feel ?;P
Thanks,
Arindam D Tewary
|
|
|
|
|
My apologies. But the answer was there. What Christian Graus said is enough
Now about my feelings
I feel cool, pleasure and thirsty for a cup coffee.
|
|
|
|
|
Hi tisaracorner,
Have a nice time with your coffee !!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Hello ,
I have a issue with FileStream object, where I pass the value to get the data in binary formart.
code:
FileStream fileStream = new FileStream(filePath, FileMode.Open,<br />
FileAccess.Read,FileShare.None);<br />
long length = fileStream.Length;<br />
Byte[] bytesResume = new Byte[length];<br />
fileStream.GetAccessControl();<br />
fileStream.Read(bytesResume, 0, bytesResume.Length);<br />
MemoryStream memoryStream = new MemoryStream(bytesResume);<br />
applicant.ResumeFilePath = filePath;<br />
applicant.ResumeStream = memoryStream;
Above code worked good if the file does not have white spaces in it say "C:\nodata.doc"
But when I try "C:\Documents and Settings\ranjit.vaity\My Documents\noData.doc" it gives up an following error
"Access to the path <path> is denied.
Please suggest/help me on this.
Thank you in Advance
Cheers
Regards,
Ranjit Vaity
|
|
|
|
|
ranjit082976 wrote: Above code worked good if the file does not have white spaces in it say "C:\nodata.doc"
But when I try "C:\Documents and Settings\ranjit.vaity\My Documents\noData.doc" it gives up an following error
"Access to the path is denied.
That has nothing to do with the spaces. The user account that is used to run the code simply dosn't have access rights for file.
It's not white spaces, by the way, it's just spaces. White space includes other characters, like tabs and line breaks.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you for your reply, I will see to it further.
Your reply is highly appreciated
Cheers!
Regards,
Ranjit Vaity
|
|
|
|
|
Hi,
Our apllication is been developed 1.1 framework and c#
Now in our application there is a requirement where the user would upload a document, this document when uploaded should be converted to pdf.
Is there any tool that we can integrate to our application or is there any article in codeproject which explains the same? Googled, but couldnt locate correctly!!
gauthee
|
|
|
|
|
There are a number of commercial applications, yes. There's also a few free ones that exist as a print driver, perhaps you can automate word to 'print' to one of those ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Chris,
Can you suggest any so that i could implement in our application? As i said all we got to do is while saving the uploaded file its hould be saved in pdf format.
On searching a bit i found iTextSharp, is it relevant?
gauthee
|
|
|
|
|
I'm sorry, I see ads for them on this site all the time, but I've never had to use one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks though!
gauthee
|
|
|
|
|
I am using GridView control which has checkbox column (itemtemplate) and a dropdown column (itemtemplate). Also, I've set the edit/update property to OFF-as I don't want to update the database one row at a time. (ie. don't want many calls to the database--also its not very user friendly).
I have a submit button on click of which I read the values of the gridview contruct a string and pass it to the database. However, how do i deal with paging? As i move from page to page how would i keep track of what has been updated on each page?
|
|
|
|
|
will you please explain your question? do you want to use disconnection architechure and want to keep track of every page?
Basharat
|
|
|
|
|
Yes. (exactly what you are saying)
|
|
|
|