Click here to Skip to main content
15,916,600 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: i have issue for calculating Total in Grid control of ASP.net Pin
Richard Deeming30-Jul-15 7:43
mveRichard Deeming30-Jul-15 7:43 
AnswerRe: i have issue for calculating Total in Grid control of ASP.net Pin
User 41802543-Aug-15 10:17
User 41802543-Aug-15 10:17 
QuestionOnly authenticate user can access the authenticated page otherwise redirect to login page uaing ASP.NET webfroms Pin
Member 1115728828-Jul-15 21:40
Member 1115728828-Jul-15 21:40 
AnswerRe: Only authenticate user can access the authenticated page otherwise redirect to login page uaing ASP.NET webfroms Pin
Wendelius28-Jul-15 21:47
mentorWendelius28-Jul-15 21:47 
Questioncalculate the weighted average Pin
jkirkerx27-Jul-15 13:43
professionaljkirkerx27-Jul-15 13:43 
AnswerRe: calculate the weighted average Pin
Kenneth Haugland28-Jul-15 1:19
mvaKenneth Haugland28-Jul-15 1:19 
AnswerRe: calculate the weighted average Pin
deepankarbhatnagar28-Jul-15 2:14
professionaldeepankarbhatnagar28-Jul-15 2:14 
GeneralRe: calculate the weighted average Pin
jkirkerx28-Jul-15 6:25
professionaljkirkerx28-Jul-15 6:25 
QuestionDisplay data from SQL database to HTML page in table format using Angular JS Pin
iamcpmember27-Jul-15 0:21
professionaliamcpmember27-Jul-15 0:21 
QuestionApplied css styles showing wrong in mozilla firefox Pin
Member 920164824-Jul-15 2:50
Member 920164824-Jul-15 2:50 
AnswerRe: Applied css styles showing wrong in mozilla firefox Pin
jkirkerx24-Jul-15 9:29
professionaljkirkerx24-Jul-15 9:29 
GeneralRe: Applied css styles showing wrong in mozilla firefox Pin
Member 92016485-Aug-15 21:25
Member 92016485-Aug-15 21:25 
Questionhiding label and textbox after update Pin
spirospap22-Jul-15 19:16
spirospap22-Jul-15 19:16 
AnswerRe: hiding label and textbox after update Pin
Blikkies23-Jul-15 0:46
professionalBlikkies23-Jul-15 0:46 
GeneralRe: hiding label and textbox after update Pin
spirospap23-Jul-15 12:11
spirospap23-Jul-15 12:11 
this is all of my code behind:

Partial Class MyPage
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    hiddenID.Value = Convert.ToInt16(Request.QueryString("id"))

    Dim LoginLabel As Label = DirectCast(FormView1.FindControl("CurrentUserLogin"), Label)
    LoginLabel.Text = HttpContext.Current.User.Identity.Name

    If (User.IsInRole("MYDOMAIN\MyADGroup1") <> "true") Then

        Response.Redirect("~/AccessDenied.aspx")

    End If

    Dim ITContactLabel As Label = DirectCast(FormView1.FindControl("ITContactLabel"), Label)
    Dim ITContactTextBox As TextBox = DirectCast(FormView1.FindControl("PRJ_ITContactTextBox"), TextBox)

    If (User.IsInRole("MYDOMAIN\MyADGroup_X") <> "true") Then
        '   hide the ITContact label
        ITContactLabel.Style("visibility") = "hidden"
        ITContactTextBox.Visible = "false"
    End If

End Sub

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

    Dim ITContactLabel As Label = DirectCast(FormView1.FindControl("ITContactLabel"), Label)
    Dim ITContactTextBox As TextBox = DirectCast(FormView1.FindControl("PRJ_ITContactTextBox"), TextBox)

    If (User.IsInRole("MYDOMAIN\MyADGroup_X") <> "true") Then

        ITContactLabel.Style("visibility") = "hidden"
        ITContactTextBox.Visible = "false"
    End If

End Sub

End Class
SuggestionRe: hiding label and textbox after update Pin
ZurdoDev23-Jul-15 3:26
professionalZurdoDev23-Jul-15 3:26 
QuestionTrying to prevent the first dropdownlist value changing my database field unless I need to in C# Pin
Norris Chappell22-Jul-15 16:30
Norris Chappell22-Jul-15 16:30 
AnswerRe: Trying to prevent the first dropdownlist value changing my database field unless I need to in C# Pin
Herman<T>.Instance23-Jul-15 11:06
Herman<T>.Instance23-Jul-15 11:06 
GeneralRe: Trying to prevent the first dropdownlist value changing my database field unless I need to in C# Pin
Norris Chappell23-Jul-15 18:23
Norris Chappell23-Jul-15 18:23 
GeneralRe: Trying to prevent the first dropdownlist value changing my database field unless I need to in C# Pin
Herman<T>.Instance23-Jul-15 20:51
Herman<T>.Instance23-Jul-15 20:51 
Questionquery Pin
saif.rashid21-Jul-15 22:35
saif.rashid21-Jul-15 22:35 
AnswerRe: query Pin
Blikkies21-Jul-15 23:13
professionalBlikkies21-Jul-15 23:13 
AnswerRe: query Pin
F-ES Sitecore22-Jul-15 0:40
professionalF-ES Sitecore22-Jul-15 0:40 
AnswerRe: query Pin
Richard Deeming22-Jul-15 1:42
mveRichard Deeming22-Jul-15 1:42 
GeneralRe: query Pin
Herman<T>.Instance22-Jul-15 22:42
Herman<T>.Instance22-Jul-15 22:42 

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.