Search

You searched for the word(s): userid:850216

Matching Posts

  • Re: Using Custom SQL Queries with LINQ to SQL... Help

    ExecuteQuery is a helper method on the DataContext base class. so the question would be, how are you creating this class file?? Do this: double-click the dbml file and then right-click and take "View Code" on the context menu that pops up. That will take you to the correct class file giving you the proper "context". And, the query will work as Scott has shown in his article. here's how it looks in my test: namespace LinqConcepts { public partial class NWindTestDataContext
  • Re: Accessing cells in a GridView congtrol

    [quote user="AppDevForMe"]Why is it that I can use the same numeric value for the cells index and to bea able to access the data in different controls? [/quote] are they all under the same TemplateField?? <Columns> <asp:TemplateField> <ItemTemplate> .. are they here? .. </ItemTemplate> </asp:TemplateField> <asp:BoundField></asp:BoundField> ....... </Columns> as such, yes, for any control in the same GridViewRow you can directly use FindControl
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/26/2009
  • Re: Using a stored procedure in linq in a Data Access Layer

    [quote user="dhermsen"] foreach(GroupResultsResult item in myresults) { what goes here? } [/quote] within the loop you'll get all the fields of the local GroupResultsResult object "item" so, do a item. and intellisense will give you list IF you have a field named ID you'd get item.ID It is basically a list of multiple GroupResultsResult objects
  • Re: populate textbox in formview using eval

    [quote user="abgh"]<asp:TextBox ID="PatientNameTxt" runat="server" Text='<%# Eval("firstname") %> + <%# Eval("lastname") %>'></asp:TextBox>[/quote] do this: <asp:TextBox ID="PatientNameTxt" runat="server" Text='<%# String.Format("{0} {1}", Eval("firstname"), Eval("lastname")) %>' />
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/26/2009
  • Re: Filter Gridview with Large Dataset

    [quote user="nm4568"] I need to implement a filter for each column of the gridview. I have textboxes above each column of the gridview. [/quote] check these out: http://www.codeproject.com/KB/webforms/CustomGridViewPaging.aspx http://myspow.blogspot.com/2006/11/how-to-add-filters-in-asp-net-gridview_17.html these use a DDL but the concept of filtering is the same: http://www.aspdotnetcodes.com/Asp.Net_GridView_Filter.aspx http://www.eggheadcafe.com/tutorials/aspnet/c67c4daa-83c2-4baa-aea4
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/26/2009
  • Re: Must declare the scalar variable "@id" problem. + dictionary problem.

    do you have timestamp in your table? I don't think you have to pass it in.
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/25/2009
  • Re: how to pass parameter in Page.LoadControl?

    [quote user="rickycrc"]i have find the User Control's class successfully.. but the Label cannot show the title..[/quote] you can pass in a constructor parameter (overload the constructor) - that will set up the the labels' value on first show (otherwise you'll need a method on the UC to do it) start with creating an overload: public partial class webMenu : System.Web.UI.UserControl { public webMenu(){} public webMenu(string labelValue) { lblTitle.Text = labelValue; } //....
    Posted to Web Forms (Forum) by PeteNet on 11/25/2009
  • Re: GridView1 Is Not Declared

    can you post your markup?? is it something like this: <%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup..................... %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:GridView ID="GridView1" runat="server" ................../> </asp:Content> IF so, on the same page you should be able to access it directly: protected void Page_Load(object
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/25/2009
  • Re: Disabling the gridview coulmns

    as such, a Column doesn't have a "Enable" property. But you could subscribe to the DataBound event of the GridView and disable the control(s) checking on the Edit mode. public partial class _Default : System.Web.UI.Page { private int editRow = 0; private bool editMode = false; protected void Page_Load(object sender, EventArgs e) { } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { editRow = e.NewEditIndex; editMode = true; } protected void GridView1_DataBound
    Posted to Data Presentation Controls (Forum) by PeteNet on 11/25/2009
  • Re: Sql server connection error

    sounds like you're looping through your data to insert. Is the data coming from a control like a GridView (with rows that you want to insert at one go)? You can use Batch Inserts , check this out: http://www.asp.net/learn/data-access/tutorial-66-vb.aspx Or if you have your data in a DataTable or such you can use a SqlDataAdapter with an InsertCommand and pass in the DataTable or DataSet all in one go and let ADO.NET manage it for you. Here's an example: http://dontrepeatyourself.wordpress
Page 1 of 338 (3372 items) 1 2 3 4 5 Next > ... Last »