|
Instead of place holder i placed 'Sign1' Text in Word 2007 with this i tried your code to replace it with image but iam getting System.Drawing.Bitmap in .pdf while saving instead i should .jpg image
Below is my code
object[] Parameters;
Parameters = new object[15];
Parameters[0] = "Sign1";
Parameters[1] = _missing;
Parameters[2] = _missing; ;
Parameters[3] = _missing; ;
Parameters[4] = _missing; ;
Parameters[5] = _missing;
Parameters[6] = _missing;
Parameters[7] = _missing;
Parameters[8] = _missing;
Parameters[9] = img;
Parameters[10] = _missing;
Parameters[11] = _missing;
Parameters[12] = _missing;
Parameters[13] = _missing;
Parameters[14] = _missing;
myfind.GetType().InvokeMember("Execute", BindingFlags.InvokeMethod, null, myfind, Parameters);
I am getting from img = GetSignPath();//method used to
Clipboard.SetDataObject(img);
i am getting img from below mentioned code inside GetSignPath();
MemoryStream ms = new MemoryStream((byte[])ds.Tables[0].Rows[0]["SignatureImage"]);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
imgPath = "C:\\" + comboempname.Text + ".JPG".Trim();
img.Save(imgPath);
//return imgPath;
return img;
Any Help is Appreciated
Thanks,
Harish
|
|
|
|
|
dears,i am using vs2005 web application.
one image information in hex format is like as follows.
000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A
my requirement is this hex data need to store in sql db and need to display in a website.
can anybdy help me to solve my problem??
In sql i inserted this data in an image coloumn like as follows(added ox).
INSERT INTO [Test_mm].[dbo].[PictureTable]
([Title]
,[DateAdded]
,[MIMEType]
,[Image])
VALUES
('jjj'
,'6/22/2010 3:12:04 PM'
,'hjhg'
,0x000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A)
after inserting the data i tried to display this using the code below.But the picture box is coming with a red colour cross button?
Dim ImageID As Integer = Convert.ToInt32(Request.QueryString("ImageID"))
Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("NorthwindConnection").ConnectionString)
Const SQL As String = "SELECT [MIMEType], [Image] FROM [PictureTable] WHERE [ImageID] = @ImageID"
Dim myCommand As New SqlCommand(SQL, myConnection)
myCommand.Parameters.AddWithValue("@ImageID", ImageID)
myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
Response.ContentType = myReader("MIMEType").ToString()
Response.BinaryWrite(myReader("Image"))
End If
myReader.Close()
myConnection.Close()
End Using
can anybdy help me to solve this ?i am troubling lot..pls pls help me
MEENU
|
|
|
|
|
Okay, here is my problem: I've got a web site that allows users to edit their profile. Part of this profile information will be used to populate a contact page which will include a picture of the user. Now, I'm able to upload the pictures just fine into a sql 2005 database and display that image, but if the user doesn't add an image (which they are allow not to do) then I get stuck on how to populate that into my sql stored procedure's parameter list. I keep getting an error every time I try saving the profile without an image in the file upload box. Here is the code that I am using to try to put in a dbnull value:
cmd.Parameters.AddWithValue("@picture", SqlDbType.Image).Value = DBNull.Value
Any ideas on what I'm doing wrong?
|
|
|
|
|
That doesn't look right to me. Can't you just put
cmd.Parameters.AddWithValue("@picture", DBNull.Value)
?
(Assuming your "picture" field allows nulls, of course...)
|
|
|
|
|
I guess make image field mandatory or call this method only if there is value in @picture.
Thanks,
RK..
|
|
|
|
|
hello
Can I start a thread from aspx code behind (long running stored proc call)
Thread SomeThread = new Thread(this.RunLongRunningCommand);
SomeThread.Start(SomeArg);
I'm worried aspx page worker's thread life cycle.
dev
|
|
|
|
|
|
As an alternative to using System.Threading, which I have to admit I find a difficult class to get to grips with, can I suggest an alternative method for executing a long running process (LRP) within as ASP.NET appliucation...
..this is only of any real use when you can set up your LRP in such a way that you can execute it by passing just an ID number (say to a database record), or at least only a relatively small amount of data to it via a QueryString.
Set up your LRP within a generic handler, say "lrp.ashx"
Them, in your webapage when you want to execute this, add:
Try
Dim request As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create(HttpPathOf("lrp.ashx")), System.Net.HttpWebRequest)
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
Dim postData As String = "id=" & nid.ToString ' for example - set up whatever data you need to post to the handler here
request.ContentLength = postData.Length
Dim writer As New System.IO.StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII)
writer.Write(postData)
writer.Close()
Catch ex As Exception
' whatever
End Try
Note: by
HttpPathOf("lrp.ashx")
I mean the full URL (ie starting "http://www.mydomain...." to lrp.ashx - you can't just use a relative URL or Server.MapPath
The above code will execute lrp.ashx in a new process, adn you can (for example) immediately redirect to another page while it is still executing, adn yor users will never know....
Perhaps someone here willl tell me why I shouldn't be doiung this, but I've found it works very well
And no, I can't translate it into C#!
|
|
|
|
|
I have just gotten my new assignment; which is to design an universal (generic) table editor in ASP.NET, that fetches data from SQL and is able to CRUD this data.
I quess this is a well known area to most experienced ASP.NET developers (I have just started with ASP.NET) so I presume there are solid code examples "out there".
I would be most thankful if someone provided a good solid example for the above mentioned.
Thanks in advance.
|
|
|
|
|
Have you tried Googling[^]?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
It is easy to calculate the SUM of Integers or Float values using Aggregate function 'SUM' in RDLC Report Viewer. But I am unable to calculate the SUM of Total Hrs Worked for an employee.Datatype of Total Hrs is varchar.That creates error.Is there any way out for this?Please suggest a wy to calculate sum in rdlc.
|
|
|
|
|
|
Hi All,
I have one Ajax ModalPopupExtender whose target id is one panel when inside panel i have say 2 text box say name and lastname
this contains one add button . validation i can do through java script but if i enter something here i want to check whether user exist or not if exist then this pop up should not go ...but it goes i can show it again through show javascript function
but it looks really odd
how to fix this issue.
Thanks,
amit
|
|
|
|
|
I think you should use a CustomValidator and an UpdatePanel inside the Panel that is displayed by the ModalPopupExtender.
|
|
|
|
|
I tried doing this way but not working can u provide me sample.
thanks,
amit
|
|
|
|
|
|
|
First I apologize u for my mistake..I will tell clearly my problem.i want to see output of my rdlc report page by page.What can I do for this?The report has enough records to display that do not fit on one page.Please help me..So I want to see output page by page..
|
|
|
|
|
sorry, this is not the solution of your problem. i just want to ask, how will I print rdlc without using select export.i enabled the print button but it seems it will not show. i've google but the result is only print without preview. i want it preview first then print using print button.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
|
hi,
i would like to know how to put the selectedvalue of dropdownlist in textbox of gridview.
I have a dropdownlist and textbox inside gridview.
when i select a list in dropdown, the selectedvalue will put in textbox.
note: dropdownlist is a multiple column. i will put only the 2nd column on textbox.
how will i do that?
thanks in advance
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
You will need to handle the datagrid event and set the properties appropriately. Maybe this will give you a start, DataGridDemo[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks for your reply. but i don't need an edititemtemplate. becuase i will save my data on gridview by bulk meaning the gridviewcolumns is in textbox not label. the user will edit directly in gridview without clicking edit button.
it will update/save data in just one click. that is why the link you given is not what i need. my question is how will i put the dropdownselected value in textbox in gridview.
example.
Gridview
----------------
column1 | column2
dropdown | textbox
-------------------
when select dropdownlist, the selected value copy in textbox.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
You can either do it by using javascript onchange event of dropdown or by using server side selected index changed event.
|
|
|
|