Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...view pageview page
Previous
 
Next
New Post
4/24/2009 9:34 AM
 

Hi,

How to do textbox value on image on same page?

In view page : i have image tag, dropdownlist,textbox and button

The image tag will display the images when select the dropdownlist item. If i click the submit button this "Addtext()" function can fired.


 public void Addtext(string Text)
    {

        System.Drawing.Image bitmap = (System.Drawing.Image)Bitmap.FromFile(Server.MapPath(@"~\Images\" + ddlimg.SelectedItem.Value));
       

        Font font = new Font("Arial", 20, FontStyle.Italic, GraphicsUnit.Pixel);

        Color color = Color.FromArgb(255, 255, 0, 0);
        Point atpoint = new Point(bitmap.Width / 2, bitmap.Height / 2);
        SolidBrush brush = new SolidBrush(color);
        Graphics graphics = Graphics.FromImage(bitmap);

        Stringformat sf = new Stringformat();
        sf.Alignment = StringAlignment.Center;
        sf.LineAlignment = StringAlignment.Center;


        graphics.DrawString(textbox1.Text, font, brush, atpoint, sf);
        graphics.Dispose();
        MemoryStream m = new MemoryStream();
        bitmap.Save(m, System.Drawing.Imaging.Imageformat.Jpeg);
        m.WriteTo(Response.OutputStream);
        m.Dispose();
        base.Dispose();
    }


 protected void Button1_Click(object sender, EventArgs e)
    {
       
        txt = textbox1.Text;
        AddText(txt);
    }


when i clicked button the textbox value can appeared on the image. this function "Addtext()" can made. but it shown in sepearte page not a new window.
like "http://localhost:3532/DotNetNuke/Test/tabid/67/Default.aspx"


i cannot see my button, dropdownlist, textbox controls on same page. i want to see everything on same page.

Let me know how to fix this bug

With kind regards

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...view pageview page


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out