User Profile

Collapse

Profile Sidebar

Collapse
Newface
Newface
Last Activity: Apr 17 '12, 01:56 PM
Joined: Feb 8 '12
Location: Noida,U.P,India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Newface
    replied to Display word using web handler
    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).
    See more | Go to post

    Leave a comment:


  • 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;
    ...
    See more | Go to post

    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);
    ...
    See more | Go to post
    Last edited by Newface; Feb 24 '12, 07:58 PM. Reason: parameter in Write method was added

    Leave a comment:


  • please post your updated code so that could help you further if possible.
    See more | Go to post
    Last edited by Newface; Feb 22 '12, 05:54 PM. Reason: updated was inserted

    Leave a comment:


  • Dear PsychoCoder,i am a beginner in this technology and forum so please please excuse my minor mistakes and negligence.
    See more | Go to post

    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"
    ...
    See more | Go to post

    Leave a comment:


  • Newface
    started a topic Display word using web handler

    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");
    ...
    See more | Go to post

  • Newface
    replied to Complicated date selection
    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
    See more | Go to post

    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!...
    See more | Go to post

    Leave a comment:


  • Newface
    replied to inserting browsed image to database
    in .NET
    this is resolved using bytes data....
    See more | Go to post

    Leave a comment:


  • Newface
    started a topic inserting browsed image to database
    in .NET

    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;
    ...
    See more | Go to post

  • 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");
    ...
    See more | Go to post

  • Newface
    replied to Complicated date selection
    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
    might help you in some manner
    See more | Go to post

    Leave a comment:


  • Newface
    replied to Downloaded file is corrupt
    in .NET
    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"...
    See more | Go to post

    Leave a comment:


  • Newface
    replied to Highest value from a column
    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.
    See more | Go to post
    Last edited by Newface; Feb 8 '12, 08:22 PM. Reason: Note Addition

    Leave a comment:


  • Newface
    started a topic Downloaded file is corrupt
    in .NET

    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;
    ...
    See more | Go to post
No activity results to display
Show More
Working...