Which dta-bound control are you using for dislaying data? Assume it's the GridView control, and there are two options here that you might consider (it looks the same as you would with the datagrid control in the ASP.NET 1.x):
+ You simply use the TemplateField instead, and freely customize the textbox that you will declare in the EditItemTemplate.
+ Create an event handler for the RowCreated event, and get the automatically added TextBox when the control in edit mode, and customize the style of the control.
I have an application (internal) that is ASP.NET. When the user clicks on the Pay button we open a new window (window.open()) that executes the pay logic. The problem is if someone clicks on the button too quickly they execute the window.open button logic, but they also regain focus on the prior window. This causes the payment window to disappear and the user gets confused.
Is there a way that I can either make my bottom browser minimize while the payment window is open, or make the payment window stay on top no matter what? This is critical to us going live next week. (shudder) Any help is appreciated.
My sample app has 2 pages, login.aspx (the home page) and loggedIn.aspx. login.aspx requests the user for their credentials, authenticates the user (by simply searching a collection of username/password pairs), and if successful, stores a "loggedIn=true" key in the session and redirects the user to loggedIn.aspx.
To prevent users from directly navigating to loggedIn.aspx, loggedIn.aspx.cs's Page_Load() method checks the session for the "loggedIn" key - if not found, it redirects the user to login.aspx. All this works fine.
I decided to enhance the app by having loggedIn.aspx add an error message (eg: "You must first login") to the session before redirecting a not-really-logged-in user to login.aspx. My question is, where in login.aspx.cs do I check for the presence of the "loggedIn" key (with a view to setting the text of an error message control)?
I tried Page_Load(), OnLoad() and LoadViewState() to no avail. Do these methods not get called when the page is displayed as a result of a redirect?
Hi folks, help you can help me.
I have a base web page that all my forms are inheriting from and i want to use it to control the behaviour of the enter key in the inheriting pages. Specifically, i need to ignore the enter key if it is pressed on any type of control other than a button control, either a html or asp button.
I was thinking of JScript but don't know how to determine wether the object that had focus when the enter key was pressed was a button or not.
I was after soemthing more generic that would work at a page level for all objects on the page, any button that has focus when enter is pressed will fire, any other control will not cause the page to be submited. One of the guys at work sent me this from a google group.
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs)
Dim DsExit As New DataSet
Dim dt As New DataTable
Dim i As Integer
Dim oHTMLtr As New HtmlTableRow
Dim oCell As New TableCell
Dim numrows As Integer = ksa.Rows.Count
Dim dr As DataRow
dt = DsExit.Tables.Add(0)
'add collumheaders to the Datatable
dt.Columns.Add(New DataColumn("Primaernoegle", GetType(String)))
dt.Columns.Add(New DataColumn("Grpnr", GetType(String)))
dt.Columns.Add(New DataColumn("Nr", GetType(String)))
For Each oHTMLtr In ksa.Rows
For i = 0 To numrows - 1
dr = dt.NewRow() ' created new row in the table
dr(i).add(oHTMLtr.Cells(0).InnerText)'here is the Exception
i += 1
Dim f As File
If f.Exists(Server.MapPath("XML/Bordstrimmel1.xml")) = True Then
How do i upload images from my webpage.i want to store entire images in the database so i have decided to keep the column type in database as image.however i dont know how to implement it in the front end.
The situation/requirement is something like this...
There will be a print button on the page and whenever that button is pressed content of that page will be printed. After that a confirmation box will appear asking for confirmation whether the document has been sucessfully printed, if click "yes" then a row will be inserted in a table.
Now the problem is...
i've a problem in files concept.we use to scan our official letters.we were given the task of creating a program to open a particular file when needed.and the filename is given in textbox.
can any one help me
My problem is that , i can connect database of all types, but how to fetch data from database in asp.net forms back, e.g i make a form in asp.net "FirstNanme TextField","RollNumber TextField","Class TextField" now when i enter data in these fields it will be successfully entered in the database. Now i want to fetch them in TextFields back from the database. mean i make a search field on my form and try to search some entries which user entered in database wehn i search for a specific name in search field it will be show in my form text fields, i'm not taking about datagrid o.k, (you can say when we signin in our yahoo id and see our specific profile in yahoo only the authenticated and specific user can show his dataentries in textfields in yahoo personal profile and can change his information), plz help me in this regard.Thx
I'm doing a HTTPModule to summarize the text within web pages in my web server. The summarization process is with me but i need a big corpus of words to help on summarization.
My problem is : Where do i put this corpus in memory so it can be acessed quickly in runtime ????
Now i have a static variable that stay in memory with the corpus and the next time a page loads it has already the static corpus in memory. I have this static variable when i call HTTPModule. I still have the problem of loading the corpus in the first time that someone loads the page... I takes a while reading it from a file.
Is there any way to call my HTTPModule when the IIS starts or something like that???
Do you have any other ideas that can help me???
Where do i put the corpus in memory??? A Windows Service Works??? Can i call a Windows Service that has the corpus in memory and be fast enougth???
You can initialize the value for the static variable when the ASP.NET application starts using the Application_Start event in the Global.asax[^]. You then can use the variable for subsequent requests without recreating the variable.
I need ur help, please..
I have an ASP.NET page, with a Delete Button that deleted the selected record from a SQL Database, What I need to do is to confirm delete before executing Delete code..
but I don't know how to get the result and pass it to Codebehind
What is the 'result' here?? Do u mean 'Yes' or 'No' here??
You dont worry about it. Because it'll execute postback if clicking 'Yes', otherwise do nothing.
So just simply put the code of deleting record in code-behind.
btnDelete.Attributes.Add("onClick","return confirm('are you sure..??');");
This way, if the user clicks cancel, the page won't post back, and won't do anything, if it's true, the page will post back and delete the record. I don't know if you really need to make the postback regardless of the answer.
For me it's just enough not to make the post back when the user selects cancel. How about you?
I'm learning asp.net and see an example.The page has a panel control.In page_load event handler,panel control adds 3 child textbox controls.Everytime I click a button on the page,the page showes 3 textboxes in panel.I wonder why the page doesn't show 3 times (first 3,second 6,third 9)textboxes,but always showes 3 textboxes.
Asp.net maintains state automatically.So I think the panel control should keep its state(including child controls it has have).Anyone help,thanks
Last Visit: 31-Dec-99 19:00 Last Update: 1-Mar-15 22:03