Search

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

Matching Posts

  • Can you Cast or Convert a GUID datatype to Integer? If Not how do I manipulate it?

    Look at this URL: <%# Eval("StoriesID", "Articledetails.aspx?StoriesID={0}") %> This url post to another page as you can see. The problem is that STORIESID is a GUID datatype in the DB. So the URL looks like aabc-annn-1234-1234..... So how do I capture the StoriesID of that particular article? What I am trying to do is build a comment system where users can comment on the article they just read. Here is what I ahve done CODE BEHIND on the page (Details page) 'Be sure
    Posted to Data Presentation Controls (Forum) by yousaid on 9/10/2009
  • Re: How do you use a DROPDOWN inside a Detailsview control?

    Greetings, I believe you are correct and I will test it shortly. Truth is, I got tired of trying to figure this out and dumped DetailsView control in favor of FormView. I mean, I recoded my page using FormView which offered me better control over the code. Thanks to all. yousaid
    Posted to Data Presentation Controls (Forum) by yousaid on 7/30/2009
  • Re: How do I Insert additional Parameters with FormView and Object DataSource

    [quote user="ivanpro"] Check your event handler signature. It looks like you copied if from another file that uses SqlDataSource because you are using SqlDataSourceCommandEventArgs. Try ObjDsAddproducts_Inserting(source As Object, e As ObjectDataSourceMethodEventArgs) instead. I am guessing that your EventArgs type is wrong. [/quote] You are Correct !!. I prototyped the app with SQL Datatsource and when I got it working with SQL DS, I simply copied the code and forgot to modify the event
  • Re: How do you use a DROPDOWN inside a Detailsview control?

    Greetings, I believe you are correct and I will test it shortly[quote user="Qin Dian Tang - MSFT"] Hi yousaid, You bind DropDownList in Page_Load event with postback checking, so you need to rebind it in every postback such as submit button Clicking. Thanks, [/quote]. Truth is, I got tired of trying to figure this out and dumped DetailsView control in favor of FormView. I mean, I recoded my page using FormView which offered me better control over the code. Thanks to all. yousaid
    Posted to Data Presentation Controls (Forum) by yousaid on 7/30/2009
  • Re: How do I Insert the UserId of a User into a Database Using FORMVIEW and SQL Datasource

    You ROCK !!. That was the solution. I spent two days looking for a solution. I am going to test this with Object DS to see if it works too for that. I prefer using object DS in the long run. THANKS much !! Thanks again[quote user="Dave_Winchester"] Hi Add to your SqlDataSource parameter Collection: <asp:Parameter Name="UserId" Type="Object" /> Then on the Inserting Event for the SqlDataSource: e.Command.Parameters("@UserId").Value = Membership.GetUser
    Posted to Data Presentation Controls (Forum) by yousaid on 7/27/2009
  • How do I Insert additional Parameters with FormView and Object DataSource

    I am using ObjectDataSOurce and FormView control. I have a Db, let's call it: tblProducts: tblProductsid uniqueIdentifier pk Not Null DEFAULT NEWID() ProductName nvarchar more fields......Removed UserId UniqueIdentifier FK //This references the Primary Key for ASPNET_Users Table What I want is when a user makes an insert into the TblProducts table, I want the ASPNET_user USERID field to be inserted into the userID field of the tblProducts. // USERS are Logged in before making Inserts I have created
  • How do I Insert the UserId of a User into a Database Using FORMVIEW and SQL Datasource

    I am using SQL DataSOurce and FormView control. I have a Db, let's call it: tblProducts: tblProductsid uniqueIdentifier pk Not Null DEFAULT NEWID() ProductName nvarchar more fields......Removed UserId UniqueIdentifier FK //This references the Primary Key for ASPNET_Users Table What I want is when a user makes an insert into the TblProducts table, I want the ASPNET_user USERID field to be inserted into the userID field of the tblProducts. // USERS are Logged in before making Inserts I have created
    Posted to Data Presentation Controls (Forum) by yousaid on 7/26/2009
  • Re: How do you use a DROPDOWN inside a Detailsview control?

    Greetings, Here is my codebehind Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Bind the DropdownList for countries on Page Load If Not Me.IsPostBack Then Dim CountriesDropDownList As DropDownList = CType(UserProfile.FindControl("CountriesDropDownList"), DropDownList) CountriesDropDownList.DataSource = Util.GetCountries CountriesDropDownList.DataBind() End If End Sub Here is myItem template from the DetailsView <asp:TemplateField HeaderText
    Posted to Data Presentation Controls (Forum) by yousaid on 7/25/2009
  • How do you use a DROPDOWN inside a Detailsview control?

    Greetings, I have a DropDown control INSIDE a DETAILsVIEW control. All I want is for the DropDown to be DatBind on Page Load so I use this code. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Me.IsPostBack Then Dim CountriesDropDownList As DropDownList = CType(FindControl("CountriesDropDownList"), DropDownList) CountriesDropDownList.DataSource = Util.GetCountries CountriesDropDownList.DataBind() End If End Sub The code works fine when
    Posted to Data Presentation Controls (Forum) by yousaid on 7/24/2009
  • Re: How do you use a DROPDOWN inside a Detailsview control?

    THANKS much !! But now I got a new problem. The dropdown works, that is, I can now select the countries, but here is something strange. Edits from the Edit Page are not being persisted. That is, a user can add a new Item and select a country from the MASTER page. If you look in the database you see the selected country. Now you select EDIT, you go t the EDIT Page, then you select a COUNTRY from the dropdownList and hit submit. You look in the DB, then you notice NULL was sent and the existing choice
    Posted to Data Presentation Controls (Forum) by yousaid on 7/24/2009
Page 1 of 17 (161 items) 1 2 3 4 5 Next > ... Last »