Questions tagged [webforms]

2

votes
1

answer
110

Views

Trying to make epaper dynamic using C# asp.net web form

I have static e paper but i want to develop dynamic e-paper like below url https://epaper.dawn.com/?page=15_04_2019_001 I have no idea to start e paper dynamic below is my whole html code q Times body { background-color: #fafafa; min-height: 100vh;} .container { margin: 200px auto; max-width: 600px;...
mohd mazhar khan
1

votes
2

answer
241

Views

Best way to give element custom properties in C# Webform

I have a generic html element like this 10:00 Which when it is being rendered, is having the vuejs tags being stripped. I have encountered this issue before when using basic html elements and even control tags like and my solution was to add them manually in the code behind. I don't like this meth...
OnIIcE
1

votes
1

answer
464

Views

ASP.NET Importing JavaScript File

I am trying to import my custom javascript file into my asp.net webforms. Visual Studios generated boilerplate import block inside the body that looks like this: But when I try to add: And run the site I get this error: The assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKe...
Richard
1

votes
0

answer
15

Views

display exception.ToString in error page ASP Web Forms

in error page ASP Web Form we see some information about error like: Source, Browser, IP, UserID, Error in(page.aspx), Error Message, Stack Trace how to also see exception.ToString in this page?
M.Khooryani
0

votes
0

answer
5

Views

OWIN shows yellow screen of death

We have an old web form project and we want to add OWIN to it. A Startup class is added to the project. We have both assebmly attribute and config owin:appStartup app key in place. We have referenced Microsoft.Owin.Host.SystemWeb version 4.0.0.0 in our project. Whenever OWIN wants to discover its S...
Beatles1692
1

votes
3

answer
59

Views

Can't set dropdown list selected item

I have a DropDown list on an ASP.Net web page. I'm trying to set its SelectedValue` on page load. I'm using this page as a reference. Here's my code: protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostBack) { if (Request.QueryString['searchtype'] != null) { ddlType.SelectedValue =...
Melanie
1

votes
2

answer
979

Views

Validate more than two words as minimum on asp:textbox

Hello I want to validate the input, so the method for count words is the following : public static string validateisMoreThanOneWord(string input, int numberWords) { try { int words = numberWords; for (int i = 0; i < input.Trim().Length; i++) { if (input[i] == ' ') { words--; } if (words == 0) { ret...
Jonathan Escobedo
1

votes
4

answer
5.5k

Views

Loading one user control after another has loaded - ASP.NET WebForms

I have a UserControl A that has to be loaded first and after that completes loading, I need to load a UserControl B. I prefer to add both these user controls on the page at compile time (would like to avoid dynamic loading if possible). If I add user controls on the page at compile time and set vi...
Nick
1

votes
2

answer
10.8k

Views

Add asp:textbox dynamically in ASP.NET

I have an aspx page made with ASP.NET Web Forms. What i need to create is two asp:textbox fields. I want to be able to dynamically add two new fields below that with the press of a button. So basically i want to be able to add an infinite amount of 'new' textfields. But i'm not sure how to do this i...
Vivendi
1

votes
1

answer
37

Views

Value from previous page not transferring

I have the following code, in which I am trying to transfer some text in a previous page's textbox control (located in the master page) to the same master page textbox control. However it is not working. Please let me know if you can spot the error. protected void Page_Load(object sender, EventArgs...
czolbe
1

votes
1

answer
58

Views

How to make multilinguage link text li menu and dropdownlist?

I cannot post my code but I want to know how I can write in resource file and other the link text in masterpage like and dropdownlist multilinguage in asp.net c# website.i need to use global app.global resources due to my desire to localize it in many languages to handle the files.i will be happy if...
Mintesnot Benti
1

votes
1

answer
285

Views

ASP.NET Windows Authentication - Page cannot be displayed

I have created a simple WebForm asp.net web site. I have disabled the Windows Authentication checks within the code but set IIS8 to 'Windows Authentication' as well as the web.config. I perform the Indentity.IsAuthenticated check in the backend to ensure the user is authenticated. My issue is I get...
Chris Cunning
1

votes
0

answer
23

Views

Imagebox with a webform

I am trying to use an Imagebox on a webform, and not getting the expected results. I think its something with the path, but not sure. I am new with the path formatting of C# and asp.net. Code I am trying to use(or have tried to use): T1Pic.ImageUrl = '~/bin/Resources/T1U.jpg'; T1Pic.ImageUrl = 'bi...
dwb
1

votes
1

answer
142

Views

Dynamically created button click event is not firing

I need to create a 'vote' button for each row of a query. Therefore I have to do it dynamically. However, for some reason when I am adding a button dynamically and creating it's event handler within the page_init() method- the button is created but the event is not firing when clicked. This is the c...
hrsidkpi
1

votes
1

answer
137

Views

ASP.NET page post back

In ASP .NET code, I see lot of if(!IsPostBack) checks. Let's take an example of ASP.NET MVC, when request is made to a controller method for the first time, it serves a view, say it is a razor page in this case. In this first request the IsPostBack will be false. Once the view is served by the cont...
growler
1

votes
0

answer
32

Views

Conditionally Show Grid View Columns Based On Checkboxlist

I have a requirement where I have two gridviews. One for the header, and one for the actual data. I want the header grid to start at index[0] regardless of any situation, but I want the data grid to start show/hide based at index[1] (meaning the first two rows of the grid will be displayed regardl...
Smith Stanley
1

votes
2

answer
891

Views

How to set Text of a Textbox with type= “password” in code behind

In have to set user's current password in a textbox like (********) In HTML In Code Behind txtPassword.Text = 'admin123'; Its not setting the value. Whereas, if I remove type='password' it works but that is plain text. Thank you
Hasan Ali
1

votes
0

answer
23

Views

Bootstrap classes render anchor tags disfunctional

I have a rather peculiar issue and can find nothing on it on the net. I have a following anchor tag, embedded in a aspx web form. The anchor tag, calls upon another form modal-forgotpassword.aspx. Forgot password? Easy enough right? Issue is that the link, while embedded in the web-form does not wor...
1

votes
1

answer
46

Views

JQuery To Only Add Checked Rows To Array

I am attempting to only add asp:gridviews that have been checked to my JQuery array. My issue with this is that all rows are added, regardless of check status. What would be the proper way to only add checked rows to this array: $('#btnTest').click(function () { var AjaxData = {}; var AjaxDataList...
Smith Stanley
1

votes
1

answer
29

Views

Making sense of RegisterStartupScript: How often will the JavaScript code be called?

The documentation of ScriptManager.RegisterStartupScript says (emphasis mine): Registers a startup script block for every asynchronous postback with the ScriptManager control and adds the script block to the page. [...] Remarks You use this method to register a startup script block that is included...
Heinzi
1

votes
2

answer
362

Views

Listen to event in another window

I created a window using var openedWindow = window.open(...). I have a function which should listen to click event for a button in the new window, but it never fires. Whenever I click btSearch button it should open another window and listen for #submitButton click event. btSearch.Attributes['onclick...
FCin
1

votes
1

answer
28

Views

Raise JavaScript confirm Message from ASPX web form server side

I want to raise a confirm message from asp webform code behind then complete the code sequence according to the result of user confirmation Like That: void SaveData() { bool IsAvaliable = Validate(); if(IsAvaliable) //Raise JavaScript Confirm Message if(confirm == true) { save (); } else return; //...
Mohamed Hashem
1

votes
1

answer
172

Views

Databinder.eval not working with (e.Row.DataItem, “var.var”)

I'm working on an asp webforms page. I fill the columns and rows of a gridview dynamically, and with the rowDataBound event get the sum for each row and column. and it works fine, except if the column has a name like 'EN.DESARROLLO'. it seems that the Databinder.eval doesn't work if it have a '.' i...
Dave Salazar
1

votes
1

answer
74

Views

Dropdownlist inside Updatepanel not passing selected item

I have a Gridview that has a hide/show panel. Inside the Panel there is a dropdown and a button. On button press I need the selected value of the dropdown, but I keep getting the first item, no matted what is selected. I have been investigating the issue and it is to do with the panel control. If I...
SANM2009
1

votes
0

answer
82

Views

How to use stackedbar chart in Web forms?

I have a table consisting of few data. I have used stacked bar chart in webform. How can i compare the below data ? I trying something like with the y axis with the Machine_name and in the x-axis of having Total, Turn_right and Turn_left. In stacked bar chart i get something like . How am i abl...
Aiya123
1

votes
0

answer
71

Views

Python; Submitting Web Form, How to use a search bar?

I have been trying to search a website and collect urls to the articles it yields, but I have run into problems I don't understand. I have read the following on web forms, and I believe that my problem arises because I am trying to submit prebuilt link to the search results rather than generating th...
suscat
1

votes
1

answer
65

Views

Asp.net webform error while building

I have to work on old asp.net website project and after compiling the source code i get following error Error 378 Cannot implicitly convert type 'PagerControl.LinkType [c:\Site1\images\en\UserControls\PagerControl.ascx.cs(174)]' to 'PagerControl.LinkType [c:\Users\user1\AppData\Local\Temp\Temporary...
Learning
1

votes
1

answer
466

Views

Using IE.Document.getElementById to auto fill webforms

I'm having troubles getting VBA to autofill a webform from an excel spreadsheet. Here is my html code. 1          Here is my VBA code Sub FillInternetForm() Dim IE As Object 'create new instance of IE. use reference to return current IE if 'you want to use open IE window. Easiest way I kno...
Strenski
1

votes
0

answer
124

Views

ASP.NET MVC IFrame webform CrystalReportViewer

This issue has been bugging me for a few hours. I have an MVC View(Report.cshtml) with an iframe in it. I set the src of the iframe dynamically by passing in the model. I have a webform(ReportViewer.aspx) which has a crystalreportviewer in it. I pass in the the reportname and parameters as part of q...
nhesuru10
1

votes
0

answer
8

Views

Bootstrap Modal flashes/disappears instantly - ASP.NET gridview RowCommand

Good morning everybody. I seem to be stuck between a rock and a hard place and fear I may be missing something incredibly simple. I am currently developing a webforms application using an ASP.NET GridView control. I have a bootstrap modal that is intended to display gridview row details through an...
Scott Mallon
1

votes
1

answer
180

Views

Only one instance of a ScriptManager can be added to the page error

I'm using asp web forms and I want to display a modal and I need to implement modals with another website data. Now I'm using this code to open as a popup but I would like to open the content on the same website. Agregar OC y SC Factura y guía despacho SC/OC Agregar datos Any suggestion for th...
alex
1

votes
0

answer
88

Views

dotnetopenauth with AzureAD b2c

I am using dotnetopenauth (version 4) to obtain an accesstoken for my Api. This works perfectly fine but i cannot figure out how i can read the profile information for the user (which is send back by Azure AD b2c). The first leg of the flow is a request to the authorization endpoint. (basically a ge...
1

votes
0

answer
55

Views

Creating a form in Web Forms (VS 2017) based on SQL table

Just wondered if anyone knows if there's a way to create new data input web form but populate the list of fields automatically based on the list of fields in a SQL Server table?
Phil
1

votes
1

answer
35

Views
1

votes
0

answer
184

Views

ASP.NET Web Forms Server.Transfer With Async

I'm trying to use async, task await to speed up the execution of a page. According to all my reading everyone has suggest using the Page.RegisterAsyncTask method. protected override void Page_Load(object sender, EventArgs e) { // Ensure base functionality is called for menu logic base.Page_Load(send...
Darren
1

votes
1

answer
58

Views

server side code not firing after adding jQuery UI

I have a ASP.Net Dropdownlist It is executing this code on postback protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { //my code here } But, this dropdownlist is not doing postback when I am adding jquery to it. $('#').selectmenu(); What should I do ? I want to add jquer...
Tarun Singhal
1

votes
0

answer
42

Views

public class EmailService : IIdentityMessageService

Hello dears Kindly ineed to handling the below code to send reset link password to my users but iam beginner so please help me public Task SendAsync(IdentityMessage message) { // Plug in your email service here to send an email. return Task.FromResult(0); }
mina wadea
1

votes
0

answer
58

Views

Get ApplicationUser object without going to database in .Net 4.5

I have a .Net 4.5 ASP.Net website based on Webforms. This website uses the latest security framework of OWIN and ASP.Net Identity to sign in a user. Once the user is signed in, I can see an authentication cookie in Chrome dev tools Application tab. I need to get the ApplicationUser object in code-b...
Sunil
1

votes
1

answer
48

Views

dont work MultiView and view control when upload project in host

This code is correct in visual studio But when upload in host and click on Button Error is displayed. Login failed for user 'WIN-1JU0K094NDD\IWPD_334(loyaltoi)'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more infor...
amir
1

votes
2

answer
552

Views

Stop button from submitting form

I have a button that I'm using a bootstrap 3 modal. This is an ASP.NET Webforms application. When clicking on the button it attempts to submit the form, I can tell because validation summaries are being triggered. I've already set the button type to button. I've also tried e.preventDefault() on the...
Antarr Byrd

View additional questions