Questions tagged [webforms]

0

votes
0

answer
5

Views

Page contents grows both up and down in bootstrap page

I have a problem with Bootstrap and ASP.NET WebForms. I've built a basic site which outline is basically: and then heaps of content in various containers and rows. What I've noticed is that the page grows from the center and outwards on the vertical axis, so if the page grows to where I need to scro...
JaggenSWE
0

votes
0

answer
5

Views

How to add Vue project with Vue cli to existing asp.net 4.6 Webforms project

I tried adding a vue project to a sub-folder in my asp.net 4.6 website project using vue cli. I would edit the vue app using vs code. The problems I ran into: I can't use the npm server (npm run serve) address since I need to make calls to webapi in asp.net website. First the cors problem, and even...
boruchsiper
0

votes
0

answer
3

Views

How to delete database login in crystal report

I got problem on my reporting tools, I can not parse the data for database logon in crystal report, but it's still showing parse parameter for logon enter image description here and here is my code that I tried public partial class frm_coba_report : System.Web.UI.Page { protected void Page_Load(obje...
0

votes
0

answer
7

Views

Custom Validator not validating for textbox

I'm a Beginner. I'm creating a Registration Form. I want the user to input a Username with at least 5 characters. But, my Custom Validator > isn't validating my textbox. Yes, It must be a Custom Validator. Any help is greatly appreciated but, please provide a explanation so that I'm able to underst...
Kerith Paschall
1

votes
1

answer
108

Views

Linq record not in other table

i want to know how to select those record which is not in another table. I have a query to show all the stock in a period of time var query = (from stk in ie.stocks join s in ie.staffs on stk.stk_createby equals s.stf_id where stk.stk_createdate >= startDate && stk.stk_createdate = startDate && dl.d...
Firion Redfield
1

votes
2

answer
557

Views

email form gives strange error

The email form I'm trying to fix gives me an error saying: This can not be accessed this way, you need to have an input field named 'sendtoemail' Which is strange because i have that input field. Here's the code: Contact AirKrete Locate an InstallerBecome an Installer Name: Email: Street: City: Stat...
J Robz
1

votes
2

answer
116

Views

DetailsView - Values not changing in ItemUpdating

I have DetailsView binded to one object. When ItemUpdating is called (when I click update) OldValues is empty and NewValues contains old values (are the same as before update). Code behind: private Customer customer; protected void Page_Load(object sender, EventArgs e) { using (var context = new Cus...
Szel
1

votes
1

answer
53

Views

Can we have two .master pages for single application?

I am new to .net I am working on .master page which is having my application's HEADER,FOOTER and MENU. But I have 2 applications. one is 'A' other one is 'B'. I have sub application named 'A1' under application 'A'. I need to access A1 under Application A with menu, header, footer. I need to access...
Divya Sakthivel
1

votes
1

answer
51

Views

How can I obtain a control's Handle in a ASP.NET VB project?

I want to add Cue/Watermarks to my ASP:TextBox controls for a nicer user experience, and came across the very nice CueProvider, which has this VB-adjusted version which sadly I cannot compile. My class is as follows #Region 'Imports' Imports System.Runtime.InteropServices #End Region Public Class Wa...
CodeMantle
1

votes
2

answer
84

Views

Bind label to DataSource.TotalRowCount

I have a custom DataSourceControl class that I'm using somewhat like a view model. I'm coming from WPF databinding land and I would like to be able to bind the text of a label to the TotalRowCount using a databinding expression. I can update the label from the code-behind, but that's not very MVVM....
NullEntity
1

votes
1

answer
590

Views

Could not load the assembly. The property 'assembly' must be a valid assembly ASP.NET Website project

Has anyone seen this: Only one developer is getting this on our team so it doesn't seem to me something that's checked into source control. Does anyone have any clues as to what to look at?
Corey
1

votes
1

answer
72

Views

Pause Loop until click modal button

I need enter manually some values during a loop for. I'm using C# ASP.Net with WebForms. I'm trying this: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace systemII { public partial class MY_System : S...
Bruno
1

votes
1

answer
46

Views

How do you make labels visible again once their visibility is set to false?

In asp.net webforms I have a UserControl with a code-behind file (shown below). The UserControl has two nodes in it that I am attempting to use as steps in a form. The problem is that when I get to 'Step2' and click Cancel, 'Step1' does not re-display, despite the fact that I am setting its Visible...
David
1

votes
2

answer
2.2k

Views

VB.NET: CheckBoxList - programmatically setting Items as Checked

I pass in comma separated values to this function, and check items in a checkboxlist according to the values. But there are no items checked after the function call. For example, I pass in a string '1,5,8', hoping the 3 items with value of 1,5,8 in the checkboxlist will get 'checked = true' status....
Cal
1

votes
2

answer
191

Views

PDF creation and email on clicking submit

I have a checkbox list for the products to selected, with another text entry for quantity. Upon clicking Submit, I need two actions to be performed: 1) I would like to get the customers selection and entry into an email (with a given email address) and emailed as a (create) PDF attachment with date-...
Joe
1

votes
5

answer
544

Views

FileUpload does not let me to save

I have a confusing problem. I'm trying to use FileUpload. The following code works well locally: var postedFile = uploader.PostedFile; var fileName = Path.GetFileName(postedFile.FileName); var extension = Path.GetExtension(fileName); var newFile = Guid.NewGuid() + extension; var imageFilePath = Path...
Mohammad Mirmostafa
1

votes
2

answer
449

Views

asp.net vs asp.net mvc for a converting a WPF application

We released a WPF client server application this year . It has a client (with a few dlls ) and server on the server machine (with multiple dlls with most of our logic). The server side uses Entity Framework and the service between them is TCP /IP Windows communication foundation (WCF). The client us...
Prasaanth Neelakandan
1

votes
1

answer
1.8k

Views

Understanding error handling in ASP .NET (WebForms)

I have a Web Form (.NET 4.0) web application built as: MyApp.Portal (Main portal with the pages, WCF AJAX services, scripts etc.) MyApp.BusinessLayer (Class library call DataAccess to get data) MyApp.Services (Class library contains WCF server for server side code) MyApp.DataAccess (ADO Oracle) I am...
John Doe
1

votes
2

answer
829

Views

How to have and manage the Session Timeout in this simple asp.net webforms application?

I am a new ASP.NET Webforms developer and I am struggling right now with how to have and manage session timeout in my simple test application. Generally speaking, the test application is listing a number of items. The user can add whatever he wants to a shopping cart and when he clicks on Checkout,...
Tech Lover
1

votes
1

answer
656

Views

use infragistics webdropdown in js

I am developping an ASP.NET webform application in which I have use a webdropdown component (from infragistics). I need to disabled or enabled a specific item of the webdropdown in js. I have managed to disabled server side by setting the disabled property of an item at true. c# server side : myDrop...
user2443476
1

votes
2

answer
5.5k

Views

Can Page_Load() Be Async

Can a Page_Load() method be async? I ask as if I have declared as such protected void Page_Load() Everything loads as it should. If I have it declared as such protected async void Page_Load() the Page_Load() breakpoint is not hit, nor does the catch() block get hit. Now I am trying to set my Page_...
Michael Mormon
1

votes
3

answer
526

Views

Button Click Event of Web User Control that is placed inside a popup not firing - Asp.net Webforms

I have a user Control named as Login.ascx having markup Login Here Email Password Not Registered Yet? Register here » C# code for user control is protected void BtnLogin_Click(object sender, EventArgs e) { int storeId = 1; using (var db = new SExpressEntities()) { string password = PasswordMana...
mzh
1

votes
1

answer
856

Views

Filling SqlDataAdapter

I am running a SQLQuery that takes roughly 45 seconds to run and display results. I am using Task to populate two drop downs on my page. Well the 1st drop down populates fine (the query is completed in about 2 seconds), the second it seems that the adapter.Fill(dataSet) is not waiting on the query...
1

votes
1

answer
81

Views

Retrieve new value typed from input type text with ASP.NET

I'm having trouble to retreive a input element of text type when this was previously set some C# code, for example: The HTML element in foo.aspx is defined as: From behind code, foo.aspx.cs, there's something like this: protected void Page_Load(object sender, EventArgs e) { bool has_something = ...;...
Jack
1

votes
1

answer
599

Views

Persist User Control(ASCX) EventHandler Object Across Postbacks

Say that you have a User Control(ASCX): using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace WebApplication1 { public partial class Test : System.Web.UI.UserControl { public event EventHandler Met...
David Rogers
1

votes
2

answer
791

Views

C# — Cannot implicitly convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.CheckBox'

int p = 0; int q = 0; p = 0; q = 0; string username = null; username = Session['user']; int total = 0; for (total = 1; total
user808317
1

votes
1

answer
119

Views

ASP.NET Web Forms, Something equivalent or similar like a Console for Text on a webpage

I'm moving over a simple text manipulator program in C# to ASP.NET Web Forms. I have found that 'asp:Label's can be changed from the code behind, I can't find a list of other 'asp:?things?' to use like textbox or textarea etc. I have tried but they are not valid for asp. Trying to do multiple lines...
702cs
1

votes
1

answer
1.7k

Views

Adding Text to a TextBox multiple times from code behind?

I'm still stuck... I'm using ASP.NET Web Forms. I have a TextBox: I can only add text to this textbox Once from the code behind: txtBoxAlgo.Text = ('My first line of text' + Environment.NewLine); Now my issue is if I try to add text again to the textbox nothing happens. For example: txtBoxAlgo.Text...
702cs
1

votes
2

answer
755

Views

How to Create textboxes dynamically based on rows in table of a database in asp.net web form?

I want to generate same numbers of Labels and TextBoxes depending on the numbers of my sql database's table rows. It will generate the same numbers of Labels and TextBoxes and retrieve 1 column data to the labelsThe image shows a sample of database table and a webform design
joy oares
1

votes
1

answer
62

Views

Can I save the state of a DropDownList using the SelectedIndex instead of the SelectedValue?

I have a scenario that my DropDownList is dynamically populated by the end user. But, sometimes, two or more items can have the same value. For example: When I select the third item, ASP.NET selects the second one during the page refresh, because both have the same value. So, it does not use the sel...
Vinicius Rocha
1

votes
2

answer
713

Views

Multiple values from sql query display on aspx page

I'm trying to display data from a multiquery sql to my aspx page but dont get things togheter. I have a masterpage where i want to display values from sql. My masterpage (Site.Master): This is my footer! My code behind file (Site.Master.cs): using System; using System.Collections.Generic; using Syst...
Slint
1

votes
1

answer
119

Views

How to hide a control and prevent control from loading data

I have a page that have the following code for a custom control: Let's also say I have a GridView control, just so I can cover multiple scenarios. I need to check if the user has permission to view this control by checking the Boolean: PermissionsManagement.DoesUserHavePermission(userId, permissionI...
Gabriel Graves
1

votes
1

answer
40

Views

ASP.Net - Validate information while filling out a form?

I'm trying to validate a SSN number when filling out a form, and if the user doesn't match the format, it'll display an error message. So far I got it to where you press the 'Submit' button, it will tell the error, but I want it as soon as the user tabs out of the textbox. So far this is my code (99...
Alex
1

votes
2

answer
702

Views

Creating dynamic DIV in asp .net c#

I am creating DIVs dynamically which will fetch data from my sql table(from each row) and will show it in DIVs. What problem I am facing is, it only shows the last row of my sql table in a div form Here is the html and here is the cs code static int count = 0; protected void Page_Load(object send...
Ammar
1

votes
2

answer
51

Views

Passing HTML that is created as a string on the server to the client in ASP.NET Webforms without using a Literal control

I am generating a lot of HTML as a string in the code-behind of an ASP.NET Webforms page and setting the string to an ASP.NET Literal control like this: litHTML.Text = strHtml; However, I noticed that this is making the ViewState huge. Is there any cleaner/better way to pass HTML to the client from...
Blake Rivell
1

votes
1

answer
89

Views

http to https in IIS

I realize this is a simple question, but I'm just not finding the answer. I've applied the below rule... The url I'm interested in has the pattern http://[domain]/[directory]/[aspx page] So http://example.com/funstuff/thefair.aspx The result of the rewrite is http://[domain]/[an_aspx_page] So the re...
tintyethan
1

votes
2

answer
1.9k

Views

Microsoft Report Viewer (Web Forms) Version 13

I have noticed that, after installing the April 2016 version of SSMS (located here), an updated version of the Microsoft.ReportViewer.WebForms assembly (version 13) is installed in the GAC. However, I cannot figure out how to add a reference to this assembly. The only versions that show up in the '...
1

votes
1

answer
66

Views

Web Forms: Enable button once file is selected

Using Javascript or Jquery, I'd like to enable the upload button once a file is selected. Here's my markup: The Jquery: $(document).ready(function () { $('#FileUploadControl').on('change', function () { $('#UploadButton').prop('disabled', !$(this).val()); }); }); The button is disabled, but I can't...
sojim2
1

votes
2

answer
123

Views

Font Not Installed on Client Machine

I used some special fonts in my asp.net web application .Which are not found on every machine (which use that web application) and due to which that font is not visible to client.how can i resolve it
1

votes
2

answer
602

Views

Ajax contol toolkit: how to load only scripts needed now that ToolkitScriptManager is obsolete

We are using Ajax Control toolkit. We installed this: https://www.nuget.org/packages/AjaxControlToolkit.StaticResources/ We already used ACT for bundling, by setting it in web config: We are optimizing the page and we noticed, that script is almost 1MB. This: AJAX Control Toolkit Loading All Scripts...
CyberHawk

View additional questions