Click here to Skip to main content
15,890,717 members
Home / Discussions / C#
   

C#

 
AnswerRe: SMS from C# windows application Pin
Richard MacCutchan17-Feb-13 21:58
mveRichard MacCutchan17-Feb-13 21:58 
AnswerRe: SMS from C# windows application Pin
Blikkies17-Feb-13 22:37
professionalBlikkies17-Feb-13 22:37 
AnswerRe: SMS from C# windows application Pin
Azza ALbelushi18-Feb-13 4:08
Azza ALbelushi18-Feb-13 4:08 
AnswerRe: SMS from C# windows application Pin
Amir Mohammad Nasrollahi29-Jul-13 22:06
professionalAmir Mohammad Nasrollahi29-Jul-13 22:06 
QuestionDetecting Drawn Objects Pin
ASPnoob17-Feb-13 20:54
ASPnoob17-Feb-13 20:54 
AnswerRe: Detecting Drawn Objects Pin
Richard MacCutchan17-Feb-13 21:56
mveRichard MacCutchan17-Feb-13 21:56 
QuestionHow to use Param with Enum Pin
demoninside917-Feb-13 19:25
demoninside917-Feb-13 19:25 
Question4 Images change on linkbutton click Pin
sahavasiwebwonders17-Feb-13 18:25
sahavasiwebwonders17-Feb-13 18:25 
Hi. There is a problem in my coding to display various images on linkbutton click. please correct it.. Thanks in advance.

C#
protected void linknext_Click(object sender, EventArgs e)
   {
       int i = 0;
       if (i > 4)
       {
           i--;
       }
       if (i < 4)
       {
           i++;
       }

       Loadinstituteimages();
   }

   private void Loadinstituteimages()
   {
       string instid = Request.QueryString["instid"].ToString();

       string sqlqry = "select Instimg1, Instimg2, Instimg3, Instimg4 from InstituteDetails where instid='" + instid + "'";
       DataTable dtimages = SqlHelper.Instance.GetTableByQuery(sqlqry);
       if (dtimages.Rows.Count > 0)
       {
           for (int i = 0; i < dtimages.Rows.Count; i++)
           {
               //linkprevious.Visible = true;
               Byte[] barr = new Byte[100000];
               if (i == 0)
               {
                   barr = (Byte[])dtimages.Rows[0]["Instimg1"];
                   Session["imagebytes1"] = barr;
                   instimage.Src = "data:image/png/jpg/jpeg;base64," + Convert.ToBase64String(barr);
                   string imagename1 = Convert.ToBase64String(barr);
                   Session["imagebytes1"] = barr;
               }
               else
               {

               }

               if (i == 1)
               {
                   barr = (Byte[])dtimages.Rows[0]["Instimg2"];
                   Session["imagebytes2"] = barr;
                   instimage.Src = "data:image/png/jpg/jpeg;base64," + Convert.ToBase64String(barr);
                   string imagename2 = Convert.ToBase64String(barr);
                   Session["imagebytes2"] = barr;
               }
               else
               {

               }

               if (i == 2)
               {
                   barr = (Byte[])dtimages.Rows[0]["Instimg3"];
                   Session["imagebytes3"] = barr;
                   instimage.Src = "data:image/png/jpg/jpeg;base64," + Convert.ToBase64String(barr);
                   string imagename3 = Convert.ToBase64String(barr);
                   Session["imagebytes3"] = barr;
               }
               else
               {

               }

               if (i == 3)
               {
                   barr = (Byte[])dtimages.Rows[0]["Instimg4"];
                   Session["imagebytes4"] = barr;
                   instimage.Src = "data:image/png/jpg/jpeg;base64," + Convert.ToBase64String(barr);
                   string imagename4 = Convert.ToBase64String(barr);
                   Session["imagebytes4"] = barr;
               }
               else
               {

               }
           }
       }
   }

   protected void linkprevious_Click(object sender, EventArgs e)
   {

   }

AnswerRe: 4 Images change on linkbutton click Pin
Pete O'Hanlon17-Feb-13 20:48
mvePete O'Hanlon17-Feb-13 20:48 
GeneralRe: 4 Images change on linkbutton click Pin
sahavasiwebwonders17-Feb-13 21:03
sahavasiwebwonders17-Feb-13 21:03 
GeneralRe: 4 Images change on linkbutton click Pin
Pete O'Hanlon17-Feb-13 22:36
mvePete O'Hanlon17-Feb-13 22:36 
QuestionImages change on linkbutton click Pin
sahavasiwebwonders17-Feb-13 18:24
sahavasiwebwonders17-Feb-13 18:24 
AnswerRe: Images change on linkbutton click Pin
Richard MacCutchan17-Feb-13 21:52
mveRichard MacCutchan17-Feb-13 21:52 
QuestionWebMatrix-Following Pin
Bram van Kampen16-Feb-13 15:12
Bram van Kampen16-Feb-13 15:12 
AnswerRe: WebMatrix-Following Pin
David C# Hobbyist.16-Feb-13 16:19
professionalDavid C# Hobbyist.16-Feb-13 16:19 
GeneralRe: WebMatrix-Following Pin
Bram van Kampen16-Feb-13 17:19
Bram van Kampen16-Feb-13 17:19 
AnswerRe: WebMatrix-Following Pin
N a v a n e e t h16-Feb-13 18:00
N a v a n e e t h16-Feb-13 18:00 
GeneralRe: WebMatrix-Following Pin
Bram van Kampen17-Feb-13 14:45
Bram van Kampen17-Feb-13 14:45 
GeneralRe: WebMatrix-Following Pin
N a v a n e e t h17-Feb-13 17:10
N a v a n e e t h17-Feb-13 17:10 
AnswerRe: WebMatrix-Following Pin
Dave Kreskowiak16-Feb-13 18:50
mveDave Kreskowiak16-Feb-13 18:50 
GeneralRe: WebMatrix-Following Pin
Bram van Kampen17-Feb-13 14:50
Bram van Kampen17-Feb-13 14:50 
QuestionWebMatrix Pin
Bram van Kampen16-Feb-13 14:26
Bram van Kampen16-Feb-13 14:26 
AnswerRe: WebMatrix Pin
N a v a n e e t h16-Feb-13 18:01
N a v a n e e t h16-Feb-13 18:01 
QuestionParsing a web page to get just the <p> inner text. Pin
David C# Hobbyist.16-Feb-13 6:49
professionalDavid C# Hobbyist.16-Feb-13 6:49 
AnswerRe: Parsing a web page to get just the <p> inner text. Pin
N a v a n e e t h16-Feb-13 18:32
N a v a n e e t h16-Feb-13 18:32 

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.