I have a website on the IIS but it has only the aspx file. Now I need to add the code behind for some pages. How do I go about this? I've been trying to add the attribute "codebehind" and "autoeventwireup" on the top of the aspx file but no luck (the page_load event is not being called). Also, if I double click on the button from the design view in Visual Studio, it creates the javascript handle (not the server code).
I have a remove hyperlink which is created in a literal and I want it to post some data (a number in a text box). I think this should be possible but when a user clicks the remove link I want to be able to pick up what is in some text boxes. So in short existing click triggers postback, so I can use request.form("txt1")
I have some dropdown list boxes that I need to fill with data from a database but I also need the first option to be "Show All"... So I need to combine using a datasource and manually adding an item to the top of the list. I have tried two different ways with no luck:
1. with the appendDataboundItems = true, on aspx page, and below code in codebehind:
I have a website on the IIS but it has only the aspx file. Now I need to add the code behind for some pages. How do I go about this?
I've been trying to add the attribute "codebehind" and "autoeventwireup" on the top of the aspx file but no luck (the page_load event is not being called). Also, if I double click on the button from the design view in Visual Studio, it creates the javascript handle (not the server code).
I'm using Visual Studio 2008. I've added a control on a page but can't reference it in code-behind file. When I looked at the Code-Gen file, I didn't find my new control. It looks like Visual Studio didn't update Code Gen file to include my control. Is there a way to manually re-generate that Code Gen file?
I have code that populates 2 dropdownlist in a gridview. DropStart And DropEnd I want to add time values depending on a few things here's the routine I cal.
Code:
Public Sub GenerateTime(RowIndex As Integer) Dim ComboStart As New DropDownList Dim ComboEnd As New DropDownList Dim ItemList As ListItem Dim TimeInterval As Integer Dim IntervalleCalcul As Integer Dim NombreIntervalles As Integer
[code]....
now this code is called, and runs fine, it goes in the for loop and I see if I trace it that combostart and comboend both have 96 Items in them as expected. hence it did find the controls in the gridview. but when I exit this sub and continue the code by just running the code in the asp.net page the two corresponding dropdown control don't get the values that did get added in the code behind.
In the RowEditing is when I call this routine.
Code:
Private Sub GridDetails_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridDetails.RowEditing
GridDetails.EditIndex = e.NewEditIndex GridDetails.DataBind() GenerateTime(GridDetails.EditIndex) End Sub
I am working solo on an Asp.net/C# project created by someone in the past. I created two new web forms, and then built the prjocect and did the deploy using a TFS team build project. For some strange reason, my Aspx file is not getting copied to the destination DEV server. It does get copied to a temp folder on that server, but in the end, the team build is failing and not copying over the new Aspx file.
So until I figure out how to fix the team build script, is their a way to just copy the Aspx file out to the desired server location? That as well as copying out a dll which is associated with the build file?
I have a web forms page with a button that involkes a __doPostBack callback to the page. I would like to invoke this manually - by "manually" I mean from outside the webpage, for example by using wget.
I have a web forms page with a button that involkes a __doPostBack callback to the page. I would like to invoke this manually - by "manually" I mean from outside the webpage, for example by using wget.
Iam developing a html reporting. on this i provide the manual settings of the report page like font name, font size, border style,border width,..
in the settings.aspx i save these settings in database like for border style i place a drop down None,thin,thick.
and in report.aspx i get the saved by placing a datatable and fetch the details.
i saved the border style value as thin. i fetch the value and i declare a string and assign the value. after that i have to set the border style to the string.
i am just trying to make a menu "manually" by defining menu items, i am also using css adapter for easy styling. I am facing a problem on postback, i am not getting the selected item (there is no item with class AspNet-Menu-Selected), even without css adapter i think. My menu is simple, there is master page, a couple of pages, the menu is on master page. why, and how can i solve this.
When this html code is saved as .html file and browsed, we get a file download dialog box. I wantt this to be automated instead of manually browsing in a web browser.
I don't want to databind a gridview, I want to be able to add rows myself within c# code. I can see there is a GridViewRow object and wondered if I can use this to add/remove rows as required?
I am having a hard time updating from my gridview based the value that I am setting in the datakeynames it is the Ucc field I keep getting and index out of range exception on the e.keys[0]. I have done this before so I am confused what I am missing here.
The constructors for manually creating FormsAuthenticationTicket objects force us to set an "expiration" value, and this value overrides the "timeout" setting in web.config in my tags, which is not what I want, because now the user doesn't timeout. The "session" just expires at the given time.I need to manually create my ticket for UserData reasons, and it is just the way I decided to build my app. I guess I could spend a whole lot of time and redo the way my app. authorizes, and store the "userdata" elsewhere... but this seems extremely tedious for something so small..Is there anyway to manually create an Auth Ticket and still maintain timeout settings?! And by timeout, I mean resetting the timer on user activity. Not a fixed timeout!