User Profile
Collapse
-
Is there any possible way out to read the text of ducument and display it with formatting in web page as i have requirement to read word file and show it in a web page,like in naukri.com(when we click at View tab, all the text arranged in same format is displayed). -
is this working for you?,anyway, i have prepared one test file for you as can see below:
Code://in Handler.ashx public void ProcessRequest(HttpContext context) { string Name = context.Request.QueryString.Get("ProfileName"); SqlConnection con = clsConnection.GetConnection(); SqlCommand cmd = new SqlCommand("GetDatah"); SqlDataReader dr = null;
Leave a comment:
-
just minor edit like
in place of
//SqlDataReader dr = command.Execute Reader();
//dr.Read();
//context.Respons e.BinaryWrite(( Byte[])dr[0]);
//context.Respons e.ContentType = "text/plain";
//context.Respons e.Write("Hello World");
Code:byte[] imgContent=(byte[])command.ExecuteScalar(); context.Response.ContentType = "image/jpeg"; context.Response.OutputStream.Write(imgContent,0,imgContent.Length);
Leave a comment:
-
please post your updated code so that could help you further if possible.Leave a comment:
-
Dear PsychoCoder,i am a beginner in this technology and forum so please please excuse my minor mistakes and negligence.Leave a comment:
-
Please include a webhandler to display your image in gridview,otherw ise i think it is not possible,if possible then do intimate me.for now include a templatefield in your gridview columns like below
Code:<asp:TemplateField> <ItemTemplate> <img src="~/ShowImage.ashx?FacultyID=<%# Eval(FacultyID) %>" runat="server" width="100"
Leave a comment:
-
Display word using web handler
please help me display word document in a page using web handler or any other way available as i have tried like below:
Code:protected void cmdView_Click(object sender, EventArgs e) { //ReadWriteData is a class ReadWriteData rwd = new ReadWriteData(); string sb = rwd.ReadFile(@"C:\Documents and Settings\pa_mukeshk\My Documents\Visual Studio 2008\Execute 1.0.docx");
-
if i understood,this should be :
Code:select t1.PartNumber,t1.BeginningDate,t1.EndingDate,sum(t.sales) Sales from test1 t1 inner join test t on t1.PartNumber=t.PartNo group by t1.PartNumber,t1.BeginningDate,t1.EndingDate
Leave a comment:
-
RAJASEKAR S,I too came across this issue and got it resolved in the following way
1.datatype of the image column-image
2.in aspx.cs page
and in parameter:
Please do let me know if it is workin for you or not!...Leave a comment:
-
-
inserting browsed image to database
Error:Invalid parameter 7 ('@photo'): Data type 0x22 is a deprecated large object, or LOB, but is marked as output parameter. Deprecated types are not supported as output parameters. Use current large object types instead.
my code is :
Code:protected void cmdActivatePofile_Click(object sender, EventArgs e) { SqlConnection con = Connection.GetConnection(); HttpPostedFile uploadedImage=null;
-
StreamReader to read word file-(output-Strange Characters)
I am trying to read a word file and display it in a panel.
my idea is like below,which is not providing correct output:
Code:protected void cmdView_Click(object sender, EventArgs e) { //ReadWriteData is a class ReadWriteData rwd = new ReadWriteData(); string sb = rwd.ReadFile(@"C:\Documents and Settings\pa_mukeshk\My Documents\Visual Studio 2008\Execute 1.0.docx");
-
just i was try to understand your issue and as per my perception
Code:select partno,sum(sales) sale from test where date >'2003-01-01' and date<'2006-01-01' group by partno
Leave a comment:
-
The file is corrupt and con not be opended
I am trying download any specific file from database through this code.the issue is after execution of this code file is downloaded but if click open,it shows "the file is corrupt and con not be opended"...Leave a comment:
-
Select top 1 [column_table]
from [table_name]
group by [column_table]
order by [max(len([column_table]))] desc
Note:Please use Rownum in place of top if using oracle after where clause.Leave a comment:
-
Downloaded file is corrupt
Code:string SQL = "SELECT FileName,FileSize,ContentType,FileData FROM FileTable WHERE FileID = '" + FileID + "'"; SqlConnection con = Connection.GetConnection(); SqlCommand cmd = new SqlCommand(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(SQL, con); cmd.CommandType = CommandType.Text; cmd.Connection = con;
No activity results to display
Show More
Leave a comment: