Click here to Skip to main content
15,891,762 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Sorting gridview (using IList instead of Dataset) Pin
Anurag Gandhi2-Feb-10 18:51
professionalAnurag Gandhi2-Feb-10 18:51 
Questionlogin - default.aspx Pin
arkiboys2-Feb-10 5:06
arkiboys2-Feb-10 5:06 
AnswerRe: login - default.aspx Pin
arkiboys2-Feb-10 5:34
arkiboys2-Feb-10 5:34 
GeneralRe: login - default.aspx Pin
JP_Rocks19-Oct-11 3:12
JP_Rocks19-Oct-11 3:12 
QuestionNeed to build a ASP.NET web page to check the health of a web application Pin
NehaPragna2-Feb-10 2:51
NehaPragna2-Feb-10 2:51 
AnswerRe: Need to build a ASP.NET web page to check the health of a web application Pin
Vipul Mehta2-Feb-10 18:58
Vipul Mehta2-Feb-10 18:58 
GeneralRe: Need to build a ASP.NET web page to check the health of a web application Pin
NehaPragna9-Feb-10 2:25
NehaPragna9-Feb-10 2:25 
QuestionGrid View Silverlight issue Pin
Amit Patel19852-Feb-10 2:47
Amit Patel19852-Feb-10 2:47 
Hi All,

if (!IsPostBack)
        {
            if (Session["userId"] == null || Session["SessionId"] == null)
                Response.Redirect("~/Login.aspx");
            else
            {
                BindModalities();
                UserRole curRole = (UserRole)Convert.ToInt32(Session["roleId"]);
                InitializeRoleView(curRole);

                if (Session["SelWorklistView"] != null)
                    InitializeWorklistView();
                else
                {
                    if (curRole == UserRole.Admin)
                    {
                        Session["SelWorklistView"] = (Int32)Global.WorklistView.ReqPending;
                        InitializeWorklistView();
                    }
                    else
                    {
                        Session["SelWorklistView"] = (Int32)Global.WorklistView.Pending;
                        InitializeWorklistView();
                    }
                }
            }
        }


and in Row Data Bound Event

This will add silverlight button in a grid.

protected void worklistGridView_RowDataBound(object sender, GridViewRowEventArgs e)
   {
       if (e.Row.RowType == DataControlRowType.DataRow)
       {
           RisStudyItem selStudy = e.Row.DataItem as RisStudyItem;
           string idealHost = selStudy.Server.HostLocal;
           string tempStr = idealHost.Substring(0, idealHost.LastIndexOf('.') + 1);
           if (idealHost == null || idealHost == "" || tempStr == null || tempStr == "" || !Request.UserHostAddress.StartsWith(tempStr))
               idealHost = selStudy.Server.HostExt;

           HtmlGenericControl obj = new HtmlGenericControl("object");
           obj.Attributes["data"] = "data:application/x-silverlight-2,";
           obj.Attributes["type"] = "application/x-silverlight-2";
           obj.Attributes["height"] = "30px";
           obj.Attributes["width"] = "130px";

           HtmlGenericControl par1 = new HtmlGenericControl("param");
           par1.Attributes["name"] = "source";
           par1.Attributes["value"] = "../ClientBin/Moksha.Ris.Silverlight.xap";
           obj.Controls.Add(par1);

           HtmlGenericControl par2 = new HtmlGenericControl("param");
           par2.Attributes["name"] = "onError";
           par2.Attributes["value"] = "onSilverlightError";
           obj.Controls.Add(par2);

           HtmlGenericControl par3 = new HtmlGenericControl("param");
           par3.Attributes["name"] = "background";
           par3.Attributes["value"] = "white";
           obj.Controls.Add(par3);

           HtmlGenericControl par4 = new HtmlGenericControl("param");
           par4.Attributes["name"] = "minRuntimeVersion";
           par4.Attributes["value"] = "3.0.40624.0";
           obj.Controls.Add(par4);

           HtmlGenericControl par5 = new HtmlGenericControl("param");
           par5.Attributes["name"] = "autoUpgrade";
           par5.Attributes["value"] = "true";
           obj.Controls.Add(par5);

           HtmlGenericControl par6 = new HtmlGenericControl("param");
           par6.Attributes["name"] = "initParams";
           par6.Attributes["value"] = "suid=" + selStudy.StudyInstanceUID +
                                      ",studyInsts=" + selStudy.NumberOfStudyRelatedInstances +
                                      ",idealHost=" + idealHost +
                                      ",studyDate=" + selStudy.StudyDate +
                                      ",username=" + selStudy.Server.Username +
                                      ",password=" + selStudy.Server.Password;
           obj.Controls.Add(par6);

           e.Row.Cells[14].Controls.Add(obj);

       }

   }


I have a Radio button in Grid so when i m selecting silverlight control so i need to all thing again.

Thanks and regards,

Amit Patel
AnswerRe: Grid View Silverlight issue Pin
Rutvik Dave2-Feb-10 5:31
professionalRutvik Dave2-Feb-10 5:31 
Questionhow to give access to different user for different pages in asp.net with c# Pin
developerit2-Feb-10 2:38
developerit2-Feb-10 2:38 
AnswerRe: how to give access to different user for different pages in asp.net with c# Pin
R. Giskard Reventlov2-Feb-10 4:05
R. Giskard Reventlov2-Feb-10 4:05 
GeneralMessage Removed Pin
2-Feb-10 17:40
Palash Biswas2-Feb-10 17:40 
GeneralRe: how to give access to different user for different pages in asp.net with c# Pin
R. Giskard Reventlov2-Feb-10 21:38
R. Giskard Reventlov2-Feb-10 21:38 
GeneralRe: how to give access to different user for different pages in asp.net with c# Pin
Palash Biswas2-Feb-10 22:59
Palash Biswas2-Feb-10 22:59 
GeneralRe: how to give access to different user for different pages in asp.net with c# Pin
developerit3-Feb-10 2:13
developerit3-Feb-10 2:13 
GeneralRe: how to give access to different user for different pages in asp.net with c# Pin
Palash Biswas3-Feb-10 16:56
Palash Biswas3-Feb-10 16:56 
AnswerRe: how to give access to different user for different pages in asp.net with c# Pin
Palash Biswas2-Feb-10 22:55
Palash Biswas2-Feb-10 22:55 
QuestionAutomatically upload images Pin
Yosh_2-Feb-10 2:07
professionalYosh_2-Feb-10 2:07 
AnswerRe: Automatically upload images Pin
Not Active2-Feb-10 2:11
mentorNot Active2-Feb-10 2:11 
GeneralRe: Automatically upload images Pin
Yosh_2-Feb-10 3:06
professionalYosh_2-Feb-10 3:06 
GeneralRe: Automatically upload images Pin
Not Active2-Feb-10 4:11
mentorNot Active2-Feb-10 4:11 
QuestionMail sending problem Pin
Member 42602702-Feb-10 1:14
Member 42602702-Feb-10 1:14 
AnswerRe: Mail sending problem Pin
m@dhu2-Feb-10 1:46
m@dhu2-Feb-10 1:46 
GeneralRe: Mail sending problem Pin
Member 38751892-Feb-10 7:26
Member 38751892-Feb-10 7:26 
QuestionHow to create an API ? Pin
kingshez1-Feb-10 23:45
kingshez1-Feb-10 23:45 

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.