Click here to Skip to main content
15,905,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Color parameter in query string ? Pin
Steve Wellens11-Feb-10 7:36
Steve Wellens11-Feb-10 7:36 
AnswerRe: Color parameter in query string ? Pin
Abhishek Sur11-Feb-10 11:46
professionalAbhishek Sur11-Feb-10 11:46 
Questionreportviewer Pin
arkiboys11-Feb-10 3:43
arkiboys11-Feb-10 3:43 
AnswerRe: reportviewer Pin
Pranay Rana11-Feb-10 19:01
professionalPranay Rana11-Feb-10 19:01 
GeneralRe: reportviewer Pin
arkiboys12-Feb-10 10:43
arkiboys12-Feb-10 10:43 
QuestionResponse Problem in asp updated Pin
Hema Bairavan11-Feb-10 3:29
Hema Bairavan11-Feb-10 3:29 
AnswerRe: Response Problem in asp updated Pin
R22k11-Feb-10 3:41
R22k11-Feb-10 3:41 
GeneralRe: Response Problem in asp updated Pin
Hema Bairavan11-Feb-10 3:51
Hema Bairavan11-Feb-10 3:51 
GeneralRe: Response Problem in asp updated Pin
T M Gray11-Feb-10 9:45
T M Gray11-Feb-10 9:45 
GeneralRe: Response Problem in asp updated Pin
Hema Bairavan11-Feb-10 17:48
Hema Bairavan11-Feb-10 17:48 
GeneralRe: Response Problem in asp updated Pin
T M Gray12-Feb-10 4:16
T M Gray12-Feb-10 4:16 
QuestionResponse Problem in asp Pin
Hema Bairavan11-Feb-10 3:27
Hema Bairavan11-Feb-10 3:27 
Questionbrowse to reporting servicces report [modified] Pin
arkiboys11-Feb-10 2:59
arkiboys11-Feb-10 2:59 
AnswerRe: browse to reporting servicces report Pin
arkiboys11-Feb-10 3:37
arkiboys11-Feb-10 3:37 
GeneralRe: browse to reporting servicces report Pin
Hema Bairavan11-Feb-10 3:53
Hema Bairavan11-Feb-10 3:53 
GeneralRe: browse to reporting servicces report Pin
arkiboys11-Feb-10 3:57
arkiboys11-Feb-10 3:57 
QuestionHelp in Widget Pin
Rock Star.11-Feb-10 1:42
Rock Star.11-Feb-10 1:42 
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

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.