Click here to Skip to main content
16,005,080 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Creating a new Document management Pin
Christian Graus29-Oct-08 21:05
protectorChristian Graus29-Oct-08 21:05 
QuestionCreating a new Document management website similar to Google doc Pin
Navinchandran29-Oct-08 19:19
Navinchandran29-Oct-08 19:19 
AnswerRe: Creating a new Document management website similar to Google doc Pin
Sathesh Sakthivel29-Oct-08 19:35
Sathesh Sakthivel29-Oct-08 19:35 
Questionhow to read data from sqlserver and convert it into XMl using XSLT Pin
googlejumbo29-Oct-08 18:46
googlejumbo29-Oct-08 18:46 
AnswerRe: how to read data from sqlserver and convert it into XMl using XSLT Pin
Ashfield29-Oct-08 22:15
Ashfield29-Oct-08 22:15 
QuestionMenu Pin
kjosh12329-Oct-08 15:37
kjosh12329-Oct-08 15:37 
AnswerRe: Menu Pin
AhsanS29-Oct-08 18:35
AhsanS29-Oct-08 18:35 
QuestionError while converting Physical path into bitmapImage Pin
suresh_00129-Oct-08 14:53
suresh_00129-Oct-08 14:53 
I have a task of Embeding Image with text.it works fine in Ordinary Asp.Net Page but Ajax.
I have come accross the error"Parameter is not vaid" while converting Physical path of image into bitmap image.I am sending code(Aspx code and class file) with this mail kindly Let me know how to solve this error.
Code:
 
Aspx Page:
private void WaterImaging()
    {
        if (!string.IsNullOrEmpty(fuPictureImage.PostedFile.FileName))
        {

            if (!string.IsNullOrEmpty(txtEmbedText.Text) & !string.IsNullOrEmpty(txtLeft.Text) & !string.IsNullOrEmpty(txtTop.Text))
            {
               
                string imagePath = null;
                string strFileNameToSave = null;
                string fname = null;

                imagePath = fuPictureImage.PostedFile.FileName;
                fname = Path.GetFileName(imagePath);
                strFileNameToSave = Server.MapPath(".") + @"\uploads\watermarkimages\" + fname;
                DAMS_Cls_Imaging.EmbedText(imagePath, txtEmbedText.Text, ddlFontName.SelectedItem.Text, ddlFontColor.SelectedItem.Text, ddlSize.SelectedItem.Text, txtLeft.Text, txtTop.Text, strFileNameToSave);
               
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "Message", "alert('Enter all the Parameter Values for Embed a Text');", true);
            }
        }

        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Message", "alert('Select Image to perform the Operation');", true);
        }
           
    }
 
 
 Class.cs(File)
 public static Bitmap EmbedImage(string imagePath, string imgEmbedPath, string width, string height, string left, string top)
         {
             Graphics graphEmbedImage = default(Graphics);
             //Dim BrushColor As System.Drawing.Brush
           
             string strImagePath = null;
             string strTempPath = null;
             strTempPath = Path.GetFileName(imagePath);
             strImagePath = Path.GetFullPath(imagePath);
             Bitmap bmpImage = new Bitmap(strImagePath); \\This is where I am getting Error Parameter not valid"
           
             try {
                 Image embededImage = default(Image);
                 embededImage = Image.FromFile(imgEmbedPath);
               
                 int iWidth = 0;
                 int iHeight = 0;
                 int iLeft = 0;
                 int iTop = 0;
               
                 iWidth = Convert.ToInt32(width);
                 iHeight = Convert.ToInt32(height);
                 iLeft = Convert.ToInt32(left);
                 iTop = Convert.ToInt32(top);
                 graphEmbedImage = Graphics.FromImage(bmpImage);
                 graphEmbedImage.DrawImage(embededImage, iLeft, iTop, iWidth, iHeight);
                 return bmpImage;
             }
             catch (Exception ex) {
                 throw ex;
             }
             finally {
                 graphEmbedImage.Dispose();
             }
           
         }
 
thanks

suresh

AnswerRe: Error while converting Physical path into bitmapImage Pin
Christian Graus29-Oct-08 16:27
protectorChristian Graus29-Oct-08 16:27 
QuestionOpinions please Pin
ffowler29-Oct-08 7:32
ffowler29-Oct-08 7:32 
AnswerRe: Opinions please Pin
Jörgen Andersson29-Oct-08 10:21
professionalJörgen Andersson29-Oct-08 10:21 
GeneralRe: Opinions please Pin
ffowler30-Oct-08 3:10
ffowler30-Oct-08 3:10 
Questionvirtual subdomain without ISAPI [modified] Pin
m-khansari29-Oct-08 4:44
m-khansari29-Oct-08 4:44 
AnswerRe: virtual subdomain without ISAPI Pin
Rajasekharan Vengalil29-Oct-08 6:05
Rajasekharan Vengalil29-Oct-08 6:05 
GeneralRe: virtual subdomain without ISAPI Pin
m-khansari2-Nov-08 3:01
m-khansari2-Nov-08 3:01 
GeneralRe: virtual subdomain without ISAPI Pin
mehran.asg3-Apr-10 21:28
mehran.asg3-Apr-10 21:28 
Questionproblem : web service (webmethod) doesn't return an object. Pin
prasadbuddhika29-Oct-08 3:04
prasadbuddhika29-Oct-08 3:04 
AnswerRe: problem : web service (webmethod) doesn't return an object. Pin
Parwej Ahamad29-Oct-08 5:51
professionalParwej Ahamad29-Oct-08 5:51 
QuestionBinding data from a grid of one page to the grid of second page Pin
srinivaskonijeti29-Oct-08 2:54
srinivaskonijeti29-Oct-08 2:54 
AnswerRe: Binding data from a grid of one page to the grid of second page Pin
Parwej Ahamad29-Oct-08 5:47
professionalParwej Ahamad29-Oct-08 5:47 
QuestionCentering controls Pin
Michael Bookatz29-Oct-08 1:58
Michael Bookatz29-Oct-08 1:58 
GeneralData Binding Navigator Pin
5fingers29-Oct-08 2:48
5fingers29-Oct-08 2:48 
GeneralRe: Data Binding Navigator Pin
Michael Bookatz29-Oct-08 2:50
Michael Bookatz29-Oct-08 2:50 
GeneralRe: Data Binding Navigator Pin
eyeseetee29-Oct-08 3:23
eyeseetee29-Oct-08 3:23 
GeneralRe: Data Binding Navigator Pin
Paul Conrad29-Oct-08 7:54
professionalPaul Conrad29-Oct-08 7:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.