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
A

ahayw01

@ahayw01
About
Posts
16
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Return Value from Stored Procedure
    A ahayw01

    Hello, Thanks yes, I did apply step 1. And was still receiving the same error message. However, just tried and tested the following and now it works return returnEmail.Value as String; Thanks again for your help, Allison

    ASP.NET csharp asp-net database help

  • Return Value from Stored Procedure
    A ahayw01

    Sandeep, Thank you so much for your quick response. I am a little confused about step 2. I think that I may not have been clear in my initial post. The returnEmail.Value should be pulling from the value that is stored in the sql table. However, I had thought that the existing code will account for that returnEmail.Direction = ParameterDirection.ReturnValue; myCommand2.Parameters.Add(returnEmail); Any additional suggestions would be appreciated. My apologies for any confusion. Allison

    ASP.NET csharp asp-net database help

  • Return Value from Stored Procedure
    A ahayw01

    Hello, I have a asp.net website and a C# web page and I am calling a stored procedure to return the email address of the user that is logged in. I have debugged my code and am presented with the following error message. Cannot implicitly convert type 'System.Data.SqlClient.SqlParameter' to 'string' Any assistance you can provide would be much appreciated. My code for the web page class and my code for the stored procedure are below. Thank you, Allison EmailTo Class public class EmailTo { public string getEmailTo() { // Command - specify as StoredProcedure using (System.Data.SqlClient.SqlConnection myConnection = new System.Data.SqlClient.SqlConnection(ConfigurationManager. ConnectionStrings["ConnectionString2"].ConnectionString)) { System.Data.SqlClient.SqlCommand myCommand2 = new System.Data.SqlClient.SqlCommand(); myCommand2.CommandText = "usp_get_email_to"; myCommand2.CommandType = CommandType.StoredProcedure; myCommand2.Connection = myConnection; // Return value as parameter SqlParameter returnEmail = new SqlParameter("Email", SqlDbType.NVarChar); returnEmail.Direction = ParameterDirection.ReturnValue; myCommand2.Parameters.Add(returnEmail); // Execute the stored procedure myConnection.Open(); myCommand2.ExecuteNonQuery(); myConnection.Close(); return returnEmail; } } } Stored Procedure CREATE PROCEDURE dbo.usp_get_email_to @Email nvarchar(256), @UserId uniqueidentifier AS SET @Email = (SELECT Email FROM aspnet_Membership WHERE UserId=@UserId) RETURN @Email GO

    ASP.NET csharp asp-net database help

  • Gridview, Checkbox and SQL Parameters based on LoginName
    A ahayw01

    Hello, Thank you for your response. I am not certain how I would use that to compare that value against the Username data field in SQL to only display values where loginname is equal to Username (in SQL). Below is my code for my aspx page. <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="document_checklist.aspx.cs" Inherits="document_checklist" Title="Document Checklist Report" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <h2>DOCUMENT CHECKLIST</h2> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="user_name" HeaderText="Username" SortExpression="user_name" /> <asp:BoundField DataField="document_name" HeaderText="Document" SortExpression="document_name" /> <asp:BoundField DataField="date_added" HeaderText="Date Added" SortExpression="date_added" /> <asp:TemplateField HeaderText="Document Read"> <ItemTemplate> </ItemTemplate> </asp:TemplateField> <asp:CheckBoxField DataField="checkbox" HeaderText="Document Read" SortExpression="checkbox" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:board_loginConnectionString3%>" SelectCommand="SELECT [user_name], [document_name], [document_type], [date_added], [checkbox] FROM [document_checklist] WHERE ([checkbox] = @checkbox)AND ([username] = @username)"> <SelectParameters> <asp:Parameter DefaultValue='0' Name="checkbox" Type="Byte" /> </SelectParameters> </asp:SqlDataSource> </asp:Content>

    ASP.NET csharp database css asp-net visual-studio

  • Gridview, Checkbox and SQL Parameters based on LoginName
    A ahayw01

    Hello, I am still learning ASP.NET, if you need additonal information or have questions please let me know. I am creating a ASP.NET site (C#) in Visual Studio.NET that is utlizing a grid view to pull data from a SQL DB. I am using the ASP.NET membership provider model for the website authentication. Access to the site is only allowed with the correct username and password. I have a webform call Document Checklist. The webform is connected to a SQL table called document_checklist. I need the Document Checklist webform to display only those documents that the logged in user has not approved. I need for the user to click on the checkbox for those documents that he has approved and click the submit button to update the SQL DB. The SQL DB contains the following columns user_name, document_name, document_url date_added, date_approved and checkbox. I have been trying to work throught this and am not certain how to proceed. 1. I am not certain how to query the SQL DB against my LoginName I have tried a few things, but am not able to capture the value of the LoginName and compare it to user_name value of teh SQL DB field. (The formatting of LoginName from ASP.NET and user_name from SQL DB is identical.) 2. I do not know how to utilze checkbox to update the SQL DB. 3. I do not know how to capture the date that the checkbox was checked and insert it into date_approved The code is below. I am not certain how to list the CheckBox_Changed in the code behind. Thank you in advance for your help. aspx C# code

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="document_checklist.aspx.cs" Inherits="members_document_checklist" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <h2>DOCUMENT CHECKLIST</h2>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
    <Columns>
    <asp:BoundField DataField="user_name" HeaderText="User Name" SortExpression="user_name" />
    <asp:TemplateField HeaderText="Document">
    <ItemTemplate>
    <asp:HyperLink ID="Document" NavigateUrl='<%# Eval("document_url") %>' Text='<%# Eval("document_name") %>' Target="_blank" runat="server" />
    </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="document_type" HeaderTe

    ASP.NET csharp database css asp-net visual-studio

  • Passing Credentials from ASP.NET to OWA
    A ahayw01

    Hello, I have an ASP.NET website with a SQL backend. I am using the ASP.NET membership provider model. The site can only be accessed by correct username and password. The login credentials for the website and OWA are identical. I would like to pass the website login credentials directly to OWA so that OWA can be accessed directly from the webiste without having to re-enter username and password. I am not certain how to securely pass the website credentials to OWA. I would greatly appreciate any assistance that you can provide. I am slightly new to ASP.NET. If you need any additional information please let me know. Thank you in advance for your help. Allison

    ASP.NET csharp asp-net database help tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Navaneeth, Thanks for your response. The solution that you proposed is great and automating this makes perfect sense. Unfortunately, I need to be able display the list of documents that need to be read and have the user check the box, confirming that he/she has read the document. I am sure I will be able to use what you proposed in my future projects. Thanks again, Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Hello, Thank you for your response. Setting up the log table as you suggested makes perfect sense. This seems very feasible and not over my head, so thanks again. Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Christian, This is an in-house project and the criteria has already been determined and laid out beforehand. Thanks again for your quick reply and your help, I really appreciate it. I will check out the information that you provided. Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Christian, Thanks that makes perfect sense, however (per the requirements provided to me), I need for the user to actually check a box or something to confirm that they have read the document. I really appreciate your help. Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Christian, Thanks for your quick reply. You bring up a good point, I see that I probably did not clarify this as well as I should. The list of documents that need to be read is a separate page that serves as a central location to store all those documents that still need to be confirmed as being read (by the user). This list contains the name of the document, a link to the document and checkbox that is to be checked once the document is read. The documents are located on a variety of pages throughout the site. Hopefully that helps. Sorry for the initial confusion. Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • Displaying User Specific Data (based on user input)
    A ahayw01

    Hello, I have an ASP.NET website with a sql backend. I am utilizing the membership provider model within visual studio. The site can only be accessed by entering the correct username and password. I have approximately 20 pdfs on the website. I need to be keep a log of who has "read" which documents. I am creating a page that lists all documents to be read. I have a check box before each url. The user will need to check off which documents he/she has read and then submit the page. When the user clicks on the link again to see the remaining documents to be read, the page should only display those documents that the user has not yet checked off. I can store the document list in a sql database but I am not certain how to maintain the log of documents for each user and how to only display the list of those documents that have not yet been read. Any thoughts or assistance would be appreciated. Also if there is more efficient way to do this please let me know. Thank you in advance for your assistance. Allison

    ASP.NET csharp database asp-net visual-studio tutorial

  • [Message Deleted]
    A ahayw01

    Cristian, Thanks, I was not certain if this should go under asp.net or web development. I will delete this post and start a new message under the asp.net section. Allison

    Web Development

  • [Message Deleted]
    A ahayw01

    [Message Deleted]

    Web Development

  • Need Assistance with Collapsible Content (C#)
    A ahayw01

    Hello, I have a web page (in C#) that stores news and events. The data (news and events) is categorized by month. When the user visits the page, I would like to display the content of the existing month only. For example, the user will see. August event 1 news 2 July June May April I would like the user to be able to click on any other month to display the content of that respective month. Ideally, only one month should be expanded at a time (however this is not imperative). Any help or assistance would be appreciated. If you need more information please let me know. Thank you, Allison

    ASP.NET csharp help tutorial announcement

  • ASP.NET and Localized Content
    A ahayw01

    Hello, I am new to the forum and am seeking some advice about my website redesign. We are creating an ASP.NET site with a sql backend. Our site is a heavily content-based site. We are looking to have an English and Spanish site. Ideally, I would like all the content to be stored in a separate file or db.I have read a few articles about localization but still have some unanswered questions. My questions are as follows: 1. Considering that most of our content is comprised of many paragraphs, what is the best method to store the content? Is it best to use sql db rather than xml to store text? (I have seen arguments for both and am leaning toward sql db.) 2. Will there be significant delays with displaying content given the fact that the site is such a heavily content-based site? Thank you in advance for your suggestions and input. Allison

    Web Development database question csharp asp-net xml
  • Login

  • Don't have an account? Register

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