Click here to Skip to main content
15,885,984 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Help in Widget Pin
T M Gray11-Feb-10 10:52
T M Gray11-Feb-10 10:52 
QuestionImage transparent in Asp.Net Pin
koncuk11-Feb-10 0:49
koncuk11-Feb-10 0:49 
AnswerRe: Image transparent in Asp.Net Pin
Anurag Gandhi11-Feb-10 1:30
professionalAnurag Gandhi11-Feb-10 1:30 
GeneralRe: Image transparent in Asp.Net Pin
koncuk11-Feb-10 1:33
koncuk11-Feb-10 1:33 
GeneralRe: Image transparent in Asp.Net Pin
i gr811-Feb-10 1:35
i gr811-Feb-10 1:35 
GeneralRe: Image transparent in Asp.Net Pin
koncuk11-Feb-10 1:38
koncuk11-Feb-10 1:38 
GeneralRe: Image transparent in Asp.Net Pin
Anurag Gandhi11-Feb-10 1:53
professionalAnurag Gandhi11-Feb-10 1:53 
QuestionGrid View DataBindings... Pin
Sasmi_Office10-Feb-10 23:58
Sasmi_Office10-Feb-10 23:58 
Dear Friend


I have one Grid contain hyperlink control, i want to set its visibility depend on Login Group, If User is "Guest" then User can not access the link but if that user is "Authorized" he can access that link.

For this, i have created following code

Form Syntex Level Code:
public partial class frmTest : System.Web.UI.Page
{
    private bool IsVisible
    {
        get { return (Session["G_UserGroup"] == "9") ? true : false; }
    }
}


Form Design:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmTest.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
		<asp:GridView ID="gvwOrders" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="True" OnSorting="gvwOrders_Sorting" EnableViewState="False">
			<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
			<Columns>
                <asp:TemplateField HeaderText="Link">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.google.com"
                            Visible='<%# Eval("IsVisible") %>'>Link</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
			</Columns>
			<RowStyle BackColor="#EFF3FB" />
			<EditRowStyle BackColor="#2461BF" />
			<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
			<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
			<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
			<AlternatingRowStyle BackColor="White" />
		</asp:GridView>
    </form>
</body>
</html>


I try to use this way as Eval is use to access different properties.

Please help me as i m going right way but issue is in syntex.

Thanks and regards
sasmi

AnswerRe: Grid View DataBindings... Pin
Gaurav Dudeja India11-Feb-10 0:04
Gaurav Dudeja India11-Feb-10 0:04 
GeneralRe: Grid View DataBindings... Pin
Sasmi_Office11-Feb-10 1:53
Sasmi_Office11-Feb-10 1:53 
AnswerRe: Grid View DataBindings... Pin
R22k11-Feb-10 0:06
R22k11-Feb-10 0:06 
AnswerRe: Grid View DataBindings... Pin
Dinesh Mani11-Feb-10 0:13
Dinesh Mani11-Feb-10 0:13 
GeneralRe: Grid View DataBindings... Pin
Sasmi_Office11-Feb-10 1:54
Sasmi_Office11-Feb-10 1:54 
AnswerRe: Grid View DataBindings... Pin
Dinesh Mani11-Feb-10 2:19
Dinesh Mani11-Feb-10 2:19 
GeneralRe: Grid View DataBindings... Pin
Sasmi_Office11-Feb-10 2:41
Sasmi_Office11-Feb-10 2:41 
GeneralRe: Grid View DataBindings... Pin
PunkIsNotDead11-Feb-10 6:15
PunkIsNotDead11-Feb-10 6:15 
QuestionNotifications require SQL Server 9.0 or later Pin
sekannak10-Feb-10 22:52
sekannak10-Feb-10 22:52 
AnswerRe: Notifications require SQL Server 9.0 or later Pin
Eddy Vluggen11-Feb-10 0:56
professionalEddy Vluggen11-Feb-10 0:56 
QuestionHow to access Network File In IIS? Pin
Dotnetkanna10-Feb-10 22:30
Dotnetkanna10-Feb-10 22:30 
AnswerRe: How to access Network File In IIS? Pin
Rhys Jacob10-Feb-10 23:25
Rhys Jacob10-Feb-10 23:25 
GeneralRe: How to access Network File In IIS? Pin
Dotnetkanna10-Feb-10 23:42
Dotnetkanna10-Feb-10 23:42 
GeneralRe: How to access Network File In IIS? Pin
Rhys Jacob11-Feb-10 0:02
Rhys Jacob11-Feb-10 0:02 
Questionsession is cleared Pin
R22k10-Feb-10 21:27
R22k10-Feb-10 21:27 
AnswerRe: session is cleared Pin
JustWorking10-Feb-10 21:46
JustWorking10-Feb-10 21:46 
GeneralRe: session is cleared Pin
R22k10-Feb-10 21:54
R22k10-Feb-10 21:54 

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.