c# - I Can't get a pic loaded onto my web form -
I am new to development from C # and asp.net. I am trying to load five images on my web form, I want to code it behind and not just drag and drop. I can not get them to work I have tried:
Dyspic [i] = New system. Web. UI. WebControl Image (); // Dicepic [0] = image. Freffile (httpxx current servermappath ("/ images / 1.gif")); I have also set such assets:
Dyspic [0] .id = "Dice 1"; Dyspic [0]. Style ["status"] = "full"; Dyspic [0] .Style ["top"] = "80px"; Dyspic [0] .Style ["left"] = "80px"; Dyspic [0]. Visual = true; Dyspic [0]. With = 50; Dyspic [0]. Heights = 50; Dyspic [0]. Image url = "~ / images / 1.jif"; // HTPCNTEX Present. Server.mappath ("/ images / 1.gif"); DicePic [0] .Controls.Add (dicePic [0]); Any help would be great thanks
change this line : Dyspic [0] .control.updated (Dyspic [0]); by this.Controls.Add (Dyspic [0]);
Comments
Post a Comment