Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

PunkIsNotDead

@PunkIsNotDead
About
Posts
74
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Confirmation Message Box in Code Behind Asp.Net [modified]
    P PunkIsNotDead

    Ajax Modal Pop Up extender has a ".Show" property... here[^] got some help! It's in your imagination the way you need to use the modal! ;)

    ASP.NET csharp asp-net help

  • insert query
    P PunkIsNotDead

    Do you mean, like using SCOPE_IDENTITY()? It stores the last inserted primary key value in the current context

    DECLARE @Last_PK_Table1 AS INT
    INSERT INTO Table1(field1, field2) VALUES ('Field1', 'Field2')
    SET @Last_PK_Table1 = SCOPE_IDENTITY()
    INSERT INTO Table2(Table1_PK, OtherField, OtherField2) VALUES (@Last_PK_Table1, 'field1', 'field testing')

    thankx

    ASP.NET question database com tutorial

  • Upload file to server
    P PunkIsNotDead

    Hi! I recomend you to use Uploadify control of jQuery! Is the easy and best upload control! for multiple or single, max capacity, type of files, queue files in progress, multi browser, etc! Here[^] :)

    ASP.NET help sysadmin

  • Search Control in GridView in asp.net
    P PunkIsNotDead

    Hi! in future post, try using the code block :-D just for better understanding of the code :thumbsup: Well, the Control, must be a GridView, so you can add

    public static Control FindControlRecursive(Control Root, string Id)
    {
    if (Root.ID == Id)
    return ((GridView)Root);
    if (Root is GridView)//or some like that (i don't remember well)
    {
    GridView gv = ((GridView)Root);
    Int32 num = 3;//Based zero, number of column where is the link button column
    Int32 row = 1;//Based zero, number of row where is the link button row
    Control FoundCtl = ((Control)gv.Rows[row].Cells[num].FindControl(Id));
    if (FoundCtl != null)
    return FoundCtl;
    }
    return null;
    }

    Remember that in ASP.NET the dinamically controls added like in grid view Template field, have the same name, except in Client-Side. if you want a especific row, you only need to change the row parameter ;)

    ASP.NET help csharp asp-net tutorial question

  • How to loop through a ASP.Net Repeater using JQuery
    P PunkIsNotDead

    I didn't ask which language is here! but thanks :-D este ud ayudando o no, tampoco me interesa. Solo trato de responder la respuesta a la pregunta anterior, no busco nada mas! gracias

    ASP.NET csharp javascript asp-net help tutorial

  • Auto Complete textbox
    P PunkIsNotDead

    Try using the auto complete with a web Method! adding up of the function

    <WebMethod()>
    Public Function blabla(ByVal prefixText As String, ByVal count As Integer) As List<String>
    Dim country As String = ("India", "UK", "Indonesia", "Japan", "Sri Lanka", "Singapore")
    Dim Qry = (From m In country Where m.ToString.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase) Select m).Take(count)
    Return Qry.ToList
    End Function

    I don't remember 100% Vb but it may work :) good luck and don't forget the

    ServiceMethod="blabla"
    ServicePath="MyPage.aspx"

    in the Extender

    ASP.NET help

  • How to loop through a ASP.Net Repeater using JQuery
    P PunkIsNotDead

    Hi! I think that Mark Nischalke is only playing with you and he isn't seriously at all! Here[^] is a tutorial that I've made about jQuery, Web Methods and SQL Server Data Populating in Grid View... I hope you know a little of spanish :laugh: if not, just try to understand and apply to your web site. Looks like the same procedure but with some changes... hope it helps :laugh: ;)

    ASP.NET csharp javascript asp-net help tutorial

  • ListView with itemtemplate- Highlight selected row
    P PunkIsNotDead

    if you can make the list view render as divs I think you can use jQuery Highlight[^] Effect. :) good luck

    ASP.NET javascript design sysadmin help tutorial

  • Crystal Report in IE8
    P PunkIsNotDead

    Hi! I've a little problem! IE8 can open a Crystal Report document whenever you have added to thust sites. (tested here[^]). I only want to prevent this procedure and do something in IIS side or programatically cause the site I'm working is a public site and nobody likes read instructions or something like that! ;) If the user visit the site with IE8 the report won't show! any help? :confused:

    Web Development help com windows-admin question

  • How to pass username and password between sites?
    P PunkIsNotDead

    Hi! thanks for reply! Ok! that's a good alternative! I've read about it and it seems well! but I was wondering if there's a way to don't involve the url in the login process! Anyway it might be the best solution (if there isn't another better) Thanks Andreas X ;)

    ASP.NET help question database tutorial

  • How to pass username and password between sites?
    P PunkIsNotDead

    Hi! I'm working in two sites! lets say that first is the public second the private one! in public site, we add a login form which redirects to the second site (in case the username and psw are correct). Now I want the user login in second site instead showing the login page (which are by default) My current problem is that sessions don't work between sites. And Query Strings are very unsecure in that way (any user writing the correct QS would login or psw would be seen in the url). How can I correct this little issue?? :confused:

    ASP.NET help question database tutorial

  • display hyperlink
    P PunkIsNotDead

    instead use Panel1.Controls.Add(MyDiv); try using Panel1.Controls.AddAt(0, MyDiv); Where 0 is the position of the controls! ;)

    ASP.NET com design help

  • usercontrol event
    P PunkIsNotDead

    Ok no problem! that's why we are here! ;)

    ASP.NET tutorial question

  • send alert message from child ascx to the parent page
    P PunkIsNotDead

    in ascx codebehind add

    protected void Page_Load(object sender, EventArgs e)
    {
    Button1.Attributes.Add("OnClick", "javascript:alert('your message');");
    }

    :) try and tell us how it worked ;)

    ASP.NET question

  • accessing textbox which is inside ascx file
    P PunkIsNotDead

    Hey what's up here? discuss your differences outside the forum ;) a property is very simple to learn! I have learned :laugh: have you searched in google?? I know nobody is perfect but when you have the opportunity to search something without posting, just search and don't mess with stressed people like us! ;) thanks :thumbsup:

    ASP.NET help question

  • usercontrol event
    P PunkIsNotDead

    Maybe it is showing! all the code is correct! :confused: i'm sure that if you put a breakpoint, the d.MyValue is the textbox.Text of user control. I've copied the text you have written! and it works for me! that simple! Have you added the event in the aspx page??

    <%--'This is how i have named my user control (TestUserControl)'--%>
    < uc1:TestUserControl ID="UsrCtr_Test" runat="server"
    OnResultOfMyText="ResultOfUserControlTextBox" / >

    to codebehind

    //triggered by the event 'OnResultOfMyText="ResultOfUserControlTextBox"'
    protected void ResultOfUserControlTextBox(object sender, ResponseEventArgs d)
    {
    Txt_MyTextBox.Text = d.MyValue;
    }

    good luck! I hope you finish with this ;P ;P

    ASP.NET tutorial question

  • usercontrol event
    P PunkIsNotDead

    have you create a class with name ResponseEventArgs.cs?? the content of that class should have

    private String _myValue;
    public String MyValue
    {
    get
    { return _myValue; }
    set { _myValue = value; }
    }}

    if you've created! then look where it is! for example, if I've created the class in a folder named "Classes", I have to reference it like Classes.ResponseEventArgs ;) Ahh and the first part is from the ResponseEventArgs.cs class! the other parts are from the ascx userControl. And in the aspx page you will see the event ResultOfMyText and when you've triggered, it would look like this

    protected void ResultOfMyText(object sender, ResponseEventArgs d)
    {
    String response = d.MyValue;
    }

    modified on Wednesday, May 19, 2010 4:28 PM

    ASP.NET tutorial question

  • usercontrol event
    P PunkIsNotDead

    Ok! I know what you need! create a class (named ResponseEventArgs) that inherits the EventArgs and add a property named myValue. Like this

    public class ResponseEventArgs : EventArgs
    {
    private String _myValue;
    public String MyValue
    {
    get { return _myValue; }
    set { _myValue = value; }
    }
    }

    Then in your ascx user control, add the event and the correct delegate

    public delegate void ResponseEventHandler(object sender, ResponseEventArgs d);

    public event ResponseEventHandler ResultOfMyText;

    here you've added the event ResultOfMyText and the handler ResponseEventHandler. Now in the ascx user control add the event as a virtual function

    [Description("Event that fires after button click of user control")]
    protected virtual void OnResult_Show(ResponseEventArgs re)
    {
    if (ResultOfMyText != null)
    ResultOfMyText(this, re);

    }

    Now in button Click event of the user control, add the correct value to MyValue Property

    //here is button_Click event of the user control
    ResponseEventArgs re = new ResponseEventArgs();
    re.MyValue = Txt_Value.Text;//You need a textbox named Txt_Value
    OnResult_Show(re);

    then when you've added this user control, you'll see that it has a event named ResultOfMyText. Trigger that event, and you'll see that you have a d.MyValue in ResultEventArgs and will execute that event every time that you click on the button inside the user control. I hope this won't be confused ;)

    ASP.NET tutorial question

  • usercontrol event
    P PunkIsNotDead

    Ok thanks mark! but that was the first thing that came to mi mind! I'll take and follow your suggestions! X|

    ASP.NET tutorial question

  • usercontrol event
    P PunkIsNotDead

    mmm! hard to understanding? let's say that you have an ascx page name Logo.ascx. Then when you add this ascx to a page named Test.aspx, your ascx User Control is named with ID="Logo1" in the Logo.ascx.cs add this:

    //this is Logo.ascx
    public string txt;
    private string Text
    {
    get { return txt; }
    set { txt = value; TextBox1.Text = value; }//You must have a TextBox named TextBox1
    }

    and now you can call the public property of the ascx file! use this in Test.aspx or any page you've added the User Control

    //and this is Test.aspx
    protected void Page_Load(object sender, EventArgs e)
    {//Once you have understand the property's world ^^ you can
    Logo1.txt = "my text";//set the property value
    TextBox2_GetText.Text = Logo1.txt;//or get it's value
    }

    ;) good luck

    ASP.NET tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups