User Profile

Collapse

Profile Sidebar

Collapse
maffarazo
maffarazo
Last Activity: Apr 30 '09, 07:24 AM
Joined: Apr 16 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • use findcontrol

    something like this:
    Code:
      protected void Button1_Click(object sender, System.EventArgs e)
        {
            Button btn = sender as Button;
            TextBox idd = btn.Parent.FindControl("t") as TextBox;
            TextBox tb = btn.Parent.FindControl("TextBox1") as TextBox;
        }
    you have to set EnableEventVali dation="false" in the
    <%@...
    See more | Go to post

    Leave a comment:


  • maffarazo
    started a topic Find id in repeater

    Find id in repeater

    Hi!

    Im currenty using a repeater to loop out all my data in my database and everything is working just great =) I just have a small problem.

    how do I get wich id the item is from the database?
    I cant put it in to a label,literal or something like that.
    When I searched about it I found out that I should use something like
    <asp:placeholde r /> but I dont know how to get it to work
    Here's my code...
    See more | Go to post
    Last edited by maffarazo; Apr 21 '09, 08:00 AM. Reason: Solved it

  • maffarazo
    replied to The basics of repeater
    sorry for making so many posts in this one and not doing the "[code]" around the code.

    anyway, the only solution I have found so far is to use

    Code:
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" EnableEventValidation="false" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" Title="Untitled Page" %>
    in the...
    See more | Go to post
    Last edited by maffarazo; Apr 17 '09, 01:19 PM. Reason: # occured where there shouldnt be any

    Leave a comment:


  • maffarazo
    replied to The basics of repeater
    to prevent this problem I changed it from private to public..

    but I still got the problem I had earlier when pressing a button

    Invalid postback or callback argument. Event validation is enabled using <pages enableEventVali dation="true"/> in configuration or <%@ Page EnableEventVali dation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback...
    See more | Go to post

    Leave a comment:


  • maffarazo
    replied to The basics of repeater
    Only one problem =( dont know how to prevent this error to occur

    CS0122: 'test.Button1_C lick(object, System.EventArg s)' is inaccessible due to its protection level

    I used:
    Code:
     private void Button1_Click(object sender, EventArgs MyEventArgs)
        {
           
            Control myControl1 = FindControl("numbers");
            if (myControl1 != null)
            {
    ...
    See more | Go to post
    Last edited by PRR; Apr 17 '09, 12:01 PM. Reason: Please post code in [code] [/code] tags.

    Leave a comment:


  • maffarazo
    replied to The basics of repeater
    Thank you very much =)

    Thx alot :D
    now can I finally finnish my project :P
    See more | Go to post

    Leave a comment:


  • maffarazo
    started a topic The basics of repeater

    The basics of repeater

    I'm going to make a website where you can purchase stuff..
    I'm having problems with the repeater. The problem is I dont know what to select in my repeater.

    it's something like this
    Code:
    <table cellpadding="0" cellspacing="0">
    <tr valign="top" >
        <td>Just nu har vi specialerbjudande på:
        </td>
    </tr>
    <tr>
    ...
    See more | Go to post
    Last edited by Frinavale; Apr 16 '09, 07:29 PM. Reason: Added code tags. Please post code in [code] [/code] tags.
No activity results to display
Show More
Working...