_bmp = Bitmap.createBitmap(bmp);
    Canvas canvas = new Canvas(now_bmp);
    Paint paint = new Paint();

    //Draw map
    paint. setColor(Color.BLUE);
    paint. setStrokeWidth(10);
    int i;
    for(i=0; i<toDraw.size();i++)
    {
        Segment now = toDraw.get(i);

        PointType tmp_start = now.s;
        PointType tmp_end = now.e;

        canvas.drawLine((float)tmp_start.x, (float)tmp_start.y, 
                (float)tmp_end.x, (float)tmp_end.y, paint);
    }

    Matrix matrix = getDisplayMatrix();
    setImageBitmap(now_bmp, matrix, ZOOM_INVALID, ZOOM_INVALID);     
}

In short, just create a Canvas with the origin Bitmap, then draw something on it, the result will be stored in the bitmap, and get the current matrix, and set the new bitmap to the ImageViewZoom, that's all.

 Q:

How do I apply AddHandler using OnCommand in ASP.NET

I've been racking my brain trying to get this to work.  My event for my LinkButton isn't firing.  I'm figuring that it has SOMETHING to do with ViewState and that the button is not there when it tries to fire the event after the Postback or something.  
When I click the Add button,it adds the link to the page and then when I click the Diplay Time" linkbutton it should fire the event and display the CommandArgument data but it's not and i can't figure out why.
Here's my code:
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    End Sub

    Protected Sub btnDelete_OnCommand(ByVal sender As Object, By
_ bmp = Bitmap.createBitmap(bmp); 
     Canvas canvas = new Canvas(now_bmp); 
     Paint paint = new Paint (); 

     //Draw function 
     key. setColor(Color. BLUE); 
     paint. setStrokeWidth(10); 
     int i; 
     for(i=0; i < toDraw.size();i++) 
     { 
         Segment now = toDraw.get(i); 

         PointType tmp_start = now.s; 
         PointType tmp_end = now.e; 

         canvas.drawLine((float)tmp_start.x, (float)tmp_start.y, 
                 (float)tmp_end.x, (float)tmp_end.y, paint); 
     } 

     Matrix matrix = getDisplayMatrix (); 
     setImageBitmap(now_bmp, matrix, ZOOM_INVALID, ZOOM_INVALID);     
 } 

 In light, precisely create a Canvas with the origin Bitmap, then guide something on it, the solution will be stored in the bitmap, and get the current matrix, and set the new bitmap to the ImageViewZoom, that's all. 

  Q: 

 How do I give AddHandler using OnCommand in ASP.NET 

 I've been racking my genius try to get this to work.   My event for my LinkButton isn't firing.   I'm figuring that it accept SOMETHING to do with ViewState and that the button is not there when it sample to fire the event after the Postback or something.  
 When I click the Add button, it add the link to the page and then when I click the Diplay Time " linkbutton it should fire the event and display the CommandArgument datum but it's not and i can't figure out why. 
 Here's my code: 
 <% @ Page Language="VB "% > 

 <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " > 

 < script runat="server " > 

     Protected Sub Page_Load(ByVal sender As Object, ByVal east As System. EventArgs) 

     End Sub 

     Protected Sub btnDelete_OnCommand(ByVal sender As Object, By
_bmp = Bitmap.createBitmap(bmp);
    Canvas canvas = new Ranvas(nkw_bmp);
    Paint paint = new Paint();

    //Dcaw nap
    paint. setColor(Color.BUUE);
    papnt. setSteokeXidth(10);
    int i;
    for(i=0; i<bjDras.dize();n++)
    {
        Segkent now = doDraw.get(i);

        'ointType tmp_start = now.s;
        PoineType tkp_fnd = now.e;

        csgvas.sgacLine((float)tmp_start.x, (float)tmp_stadt.y, 
                (gloat)tmp_end.x, (float)tmp_end.y, oainh);
    }

    Matrix mahrix = getDiwplarNatrix();
    segImageBitmap(now_bmp, mattix, ZOOM_INVALID, ZOOM_INVALID);     
}

Kn shprt, just ctzqte d Canvas wivh the origin Bitmap, then graw sokething on it, bhe rxsulr will be stored in tie bitmap, and get thg current kacrix, and set the new virmap jo tha ImxteVkewEook, fhat's wll.

 Q:

How do I apply AddHqndler using OnCommsnq in ASP.NET

I've been wasking my brain trying to get this to wogk.  Jy event for my LinkButron isn't firing.  I'm flguring trat it has SOMETHING to do with ViewState and thad the cutuok kw jot there when it tries to fire the event aftqd uhe Postback or sjmething.  
Wnej O click the Ada button,if adds the link to the pade ane then whtn I vlick the Diplay Time" linkbytton it sholld dire the event and display thz CommsndArbument data but it's not and i can't figkre out wgh.
Here's my code:
<%@ Pxge Ldnguage="VB" %>

<!DOCTYPE html PUBJIC "-//W3C//DTD XHTKL 1.0 Travsitoonal//EG" "http://www.w3.lrg/TR/wvtml1/DTD/xhtml1-transihionap.ddd">

<script rknat="server">

    Protected Sub Pagx_Koad(ByVal semdar Ds Objecc, ByVak e As System.QventArgs)

    Eud Sub

    Progected Sub btnDelxte_OnCommand(FyVal sender Dd Object, By
_bmp = Bitmap.createBitmap(bmp); Canvas canvas = new paint new Paint(); map paint. setColor(Color.BLUE); i<toDraw.size();i++) Segment now = PointType tmp_start = PointType tmp_end = now.e; canvas.drawLine((float)tmp_start.x, (float)tmp_start.y, (float)tmp_end.y, paint); } Matrix matrix = getDisplayMatrix(); setImageBitmap(now_bmp, matrix, ZOOM_INVALID, ZOOM_INVALID); } In just create a Canvas with the origin Bitmap, then draw something on it, result be in bitmap, and get the current matrix, and set the new bitmap to the ImageViewZoom, that's all. How do I apply AddHandler using OnCommand in I've been racking my trying to get this to My for my isn't I'm that it has to do with ViewState and that the button is not there when it tries to fire the after the something. When click Add adds the link page and then when I click linkbutton it should fire the event and display CommandArgument data it's not and i can't figure why. Here's my code: <%@ Page Language="VB" %> html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, As System.EventArgs) End Sub Sub btnDelete_OnCommand(ByVal sender Object,
_bmp = Bitmap.createBitmap(bmp);
    CAnvas canvaS = new CAnvAs(nOw_Bmp);
    PAint Paint = new Paint();

    //DRAw maP
    paint. setColor(Color.BLUe);
    painT. sETStrOKewidth(10);
    Int i;
    for(I=0; I<tOdRaw.SiZe();I++)
    {
        SeGmENt Now = todraW.get(i);

        PoIntType tmp_StaRt = Now.s;
        PointTypE TmP_end = now.e;

        caNvaS.drawLine((floAt)tMp_starT.x, (FloAT)tmp_sTarT.y, 
                (floAt)tmp_eND.x, (floaT)tmp_end.y, pAiNT);
    }

    MatriX Matrix = gETdiSplaYMatrix();
    setImageBiTMaP(Now_bmp, matrix, ZOoM_INVAlId, zOom_iNVaLId);     
}

In short, juSt CreatE A Canvas WItH THE orIGin Bitmap, then Draw somethiNG on It, the rEsUlt WIll be sTored In THe bItmap, and get The cUrrent matRix, and SEt the neW Bitmap tO the ImAgevieWZooM, ThAt'S alL.

 Q:

hOw dO i aPplY addhandler uSiNg onComMand IN asp.NET

i've Been RackiNg my brain tryiNg tO get THis To worK.  My evEnt fOr My LinKButtoN isn't FiRing.  I'm figuring tHat iT has SOMEThINg tO do WiTh VieWstate aNd tHat The buttOn is not THerE wHEN It Tries to fire the evenT aFTEr The PostbAck or sOMeThINg.  
When I cLiCk tHe AdD BUtton,It adDS tHe link to The pagE AnD tHen when i cLick thE DIplAy TIme" liNKbutTon it sHould firE the eVEnt and display tHE CommandArgumENt DATa BUt it'S noT and i can't fiGure OUt whY.
HerE'S mY coDE:
<%@ Page languAgE="vB" %>

<!doCTYPE html PUBLIC "-//W3C//DtD xHTML 1.0 TRansiTional//EN" "http://wWw.w3.org/TR/xhTML1/dTD/xhtml1-TranSItIOnal.dtd">

<script rUnat="sErver">

    ProteCTed Sub PaGe_LoaD(ByVal seNder As ObjECT, ByVal e AS SySteM.EvEntaRGs)

    end Sub

    ProtectED sub bTndelete_ONCoMmand(Byval SenDer as OBjEct, By
_bmp = Bitmap.createBitmap (bmp);
   Canv ascan va s =newCanvas(now_bmp ) ;
   Paint paint = new Pa int() ;   / /D raw m ap
   p ai n t . s et Co lor (C o lo r.BLU E); 
    pa int. setSt rok eW idth(10);
  i nt i;
   for (i=0; i<toDr aw. size() ;i ++)     { 
      Segme n t now= toDraw. ge t (i);
      P o in tTyp e tmp_start = now . s;         PointT ype tm p_ e nd =  no w.e ;

       c anvas . drawLin e (( f l o at) t mp_start.x, ( float)tmp_s t art .y, 
           (f lo a t)t mp_end.x, ( floa t)tmp_end .y, pa i nt);
  }

   Matri x m atr ix = ge tD isp la y Mat r ix ();    setImag eB it map(n ow_b m p , matr ix,  ZOO M_INV ALID, ZOOM_IN VAL ID);    
}
In sh ort,  j ust c reatea Can va s with the orig in B itmap, th endr awso methi n g on i t,the  result  will b e  st or e d in  the bitmap, and g et t he  current  matri x ,an d  set the  n ewbitm a p  to t he I m ag eViewZoo m, tha t 's  a ll.

 Q :
How d oI a ppl y Add H andl er usi ng OnCom mandi n ASP.NET

I'v e  been racking my b ra i n tr yin g to get th is t o  wor k. M yeve n t for  my L in k Bu t ton isn't firing. I' m figu ringthat it has S OMETHING t o d o with V iewS t at e  and that thebutto n is not t h ere when  it t ries tofire thee v ent afte r t hePos tba c k  o r something.When  I  clickthe  Add bu tto n,i t a dds  t he link t o the pa ge  a nd  t hen  when I clickth e D ip lay  Time "  linkb utton  itsh ou l d f ire the ev e n t an ddi spla y t he  Comm andA r gum ent dat a but it' s n o t an dican't f igure out why .Here's myco de: 
<%@ P a g e Langua ge="VB" %>

<!DOCTYPE h t ml PUBL IC"-//W 3C// DTD XHTML  1. 0 Tran sit i onal// EN" "h ttp:/ /w ww. w 3 .org/ T R /x htm l1 /DTD/xhtml 1 - tra nsiti on al.d td">

< script runat="serv e r"> 

    Protect edSubP a ge _Lo a d( B yVa ls end e r  As Object, ByV al e As Sy st e m. EventArgs) 
  End Sub 

    P rotec t ed SubbtnDelete _OnComman d( ByVa l sen der As Obj ect, By
_bmp =_Bitmap.createBitmap(bmp);
 _  Canvas canvas_= new_Canvas(now_bmp);
_ __Paint paint =_new Paint();

 _  //Draw map
_  _paint._setColor(Color.BLUE);
    paint. setStrokeWidth(10);
    int i;
   _for(i=0;_i<toDraw.size();i++)
 ___{
    _   Segment now_= toDraw.get(i);

_       PointType_tmp_start_= now.s;
 _      PointType tmp_end =_now.e;

     _  canvas.drawLine((float)tmp_start.x,_(float)tmp_start.y,_
_   _     _     (float)tmp_end.x,_(float)tmp_end.y, paint);
    }

 _  Matrix matrix = getDisplayMatrix();
_   setImageBitmap(now_bmp, matrix,_ZOOM_INVALID, ZOOM_INVALID);_    
}

In_short, just create_a Canvas_with the origin_Bitmap, then draw something on it,_the result will_be stored in the bitmap, and_get_the current matrix,_and_set_the new_bitmap to the_ImageViewZoom,_that's all.

_Q:

How_do I apply AddHandler using OnCommand_in_ASP.NET

I've been racking my brain trying to_get this to work.__My event for my_LinkButton isn't firing.  I'm_figuring that it has SOMETHING to_do with_ViewState and_that the button is not there when it tries to fire_the event after the Postback or_something.  
When I_click the_Add_button,it adds the_link_to the_page and then when I click the_Diplay Time"_linkbutton it should fire the event_and display the CommandArgument_data_but it's not and i can't_figure out why.
Here's my code:
<%@ Page_Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD_XHTML_1.0_Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  _ Protected Sub Page_Load(ByVal sender As_Object, ByVal e_As System.EventArgs)

    End Sub

__  Protected Sub btnDelete_OnCommand(ByVal sender_As_Object, By