Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
QuestionThe .exe application file isn't obfuscated after installing setup ? Pin
taibc24-Feb-13 4:21
taibc24-Feb-13 4:21 
AnswerRe: The .exe application file isn't obfuscated after installing setup ? Pin
Pete O'Hanlon25-Feb-13 1:58
mvePete O'Hanlon25-Feb-13 1:58 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pin
taibc25-Feb-13 3:12
taibc25-Feb-13 3:12 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pin
Pete O'Hanlon25-Feb-13 4:43
mvePete O'Hanlon25-Feb-13 4:43 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pin
taibc25-Feb-13 4:53
taibc25-Feb-13 4:53 
AnswerRe: The .exe application file isn't obfuscated after installing setup ? Pin
Samer AlRawi26-Feb-13 17:41
Samer AlRawi26-Feb-13 17:41 
GeneralRe: The .exe application file isn't obfuscated after installing setup ? Pin
taibc28-Feb-13 14:36
taibc28-Feb-13 14:36 
QuestionC# Pin
MohanKrishna.Kota24-Feb-13 4:06
MohanKrishna.Kota24-Feb-13 4:06 
how to perform update and delete operations on a grid view in which the data is already bounded on the time of page load

here is my code:
XML
<asp:GridView ID="gvUsers" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="None" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
                OnRowEditing = "gvUsers_RowEditing" OnRowDeleting = "gvUsers_RowDeleting" OnRowUpdating = "gvUsers_RowUpdating" >
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />

            </asp:GridView>


c# Code:

protected void Page_Load(object sender, EventArgs e)
    {

        if (Session["Office"] == null)
        {
            Response.Redirect("Login.aspx");
        }
        else
        {
            Session.Timeout = 1;
            L1.Text = "District:&nbsp;&nbsp;&nbsp;" + Session["district"].ToString();
            L3.Text = "Department:&nbsp;&nbsp;&nbsp;" + Session["department"].ToString();
            L4.Text = "Office:&nbsp;&nbsp;&nbsp;" + Session["Office"].ToString();

            con.Open();

            if (Session["department"].ToString() == "NIC")
            {
                SqlCommand cmd1 = new SqlCommand("select * from DeptMaster", con);
                DataSet ds = new DataSet();
                SqlDataAdapter da = new SqlDataAdapter(cmd1);
                SqlCommandBuilder cmb = new SqlCommandBuilder(da);
                da.Fill(ds, "deptmaster");
                gvUsers.DataSource = ds.Tables["deptmaster"];
                gvUsers.DataBind();
            }
            else
            {
                SqlCommand cmd1 = new SqlCommand("select * from OfficeMaster where Office ='" + Session["Office"].ToString() + "'", con);
                DataSet ds = new DataSet();
                SqlDataAdapter da = new SqlDataAdapter(cmd1);
                SqlCommandBuilder cmb = new SqlCommandBuilder(da);
                da.Fill(ds, "deptmaster");
                gvUsers.DataSource = ds.Tables["deptmaster"];
                gvUsers.DataBind();
            }
            con.Close();
        }
    }

Mohan@Coding.com

AnswerASP.NET Pin
Jegan Thiyagesan25-Feb-13 12:14
Jegan Thiyagesan25-Feb-13 12:14 
General[TUTORIAL] Native Cocoa Apps with C# and MonoMac Pin
Jake Rieger23-Feb-13 14:36
Jake Rieger23-Feb-13 14:36 
GeneralRe: [TUTORIAL] Native Cocoa Apps with C# and MonoMac Pin
Dave Kreskowiak23-Feb-13 14:39
mveDave Kreskowiak23-Feb-13 14:39 
GeneralRe: [TUTORIAL] Native Cocoa Apps with C# and MonoMac Pin
Mycroft Holmes24-Feb-13 18:17
professionalMycroft Holmes24-Feb-13 18:17 
Questionprograme Pin
ongwere23-Feb-13 9:35
ongwere23-Feb-13 9:35 
AnswerRe: programe PinPopular
SoMad23-Feb-13 10:37
professionalSoMad23-Feb-13 10:37 
GeneralRe: programe Pin
Manfred Rudolf Bihy23-Feb-13 11:37
professionalManfred Rudolf Bihy23-Feb-13 11:37 
GeneralRe: programe Pin
SoMad23-Feb-13 11:46
professionalSoMad23-Feb-13 11:46 
AnswerRe: programe Pin
Amir Mohammad Nasrollahi29-Jul-13 21:45
professionalAmir Mohammad Nasrollahi29-Jul-13 21:45 
QuestionCustomize windows scroll bar in combobox Pin
Kaizen20223-Feb-13 7:45
Kaizen20223-Feb-13 7:45 
AnswerRe: Customize windows scroll bar in combobox Pin
SledgeHammer0123-Feb-13 9:20
SledgeHammer0123-Feb-13 9:20 
GeneralRe: Customize windows scroll bar in combobox Pin
Kaizen20224-Feb-13 6:01
Kaizen20224-Feb-13 6:01 
GeneralRe: Customize windows scroll bar in combobox Pin
SledgeHammer0124-Feb-13 8:20
SledgeHammer0124-Feb-13 8:20 
Questionunable to start program, unrecognized error in windows web services framework Pin
bonosa23-Feb-13 5:06
bonosa23-Feb-13 5:06 
Questionwhy System.NullReferenceException occurred? Pin
Jassim Rahma23-Feb-13 1:54
Jassim Rahma23-Feb-13 1:54 
AnswerRe: why System.NullReferenceException occurred? Pin
Alan N23-Feb-13 2:04
Alan N23-Feb-13 2:04 
GeneralRe: why System.NullReferenceException occurred? Pin
Jassim Rahma23-Feb-13 2:10
Jassim Rahma23-Feb-13 2:10 

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.