check box question

How do I capture the click event of the check box so that every time the box is ticked a text box is enabled, and every time the box is unticked a text box is disabled

Posted On: Tuesday 1st of January 2013 10:20:24 PM Total Views:  321
View Complete with Replies

Related Messages:

create table like this   (207 Views)
1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 I want to create the table like above in 2.0. I try to find out but i can not can any solution. Can any one help me pls and c# Chat Application   (134 Views)
this is Jenshita I am using 2.0 and c# I need live chat application dont use javascript only c# code help me any one
I have to build some business objects in ASP.NET,i supposethe way is the same like ActivexDll in Visual Basic.So i build a Visual Basic.NET Class library with a new namespace, for example "MyLib", than build a new class with some methods.I want use this object in a ASP.NET web project,with session scope, so i try to insert a in theglobal.asax file.This DOES NOT WORK: the compiler d'ont recognize the "OBJ1" instance and the tag declaration raises an error in the Vb code.I use the code-behind style of global asax (and all aspx files use the same settings) created by the Visual Studio.NET environment.Where is the problem
Mouse drag and drop in gridview   (203 Views)
how to perform on mouse drag in gridveiw so that the rectangle is drawn over selected cells.
image loading   (218 Views)
hiii i want to know how to load images into oracle database from by using vb.
ASP:XML - Writing to the server   (189 Views)
ok, i've got a script (& i'm pretty sure that it is all kosher), but anytime i run it on my site it returns:Microsoft VBScript runtime error '800a0046' Permission denied /XMLform.asp, line 39 if anyone wants to take a stab at it, i'll post the complete script . . . (i think its, just the folder/dir isn't set to allow writing, but dunno) . . .
Ajax MaskedEditExtender not displaying mask   (251 Views)
Okay, this is really throwing me and making me feel crazy. I'm sure I'm missing something dumb. I'm building an account registration form, and I want to put a mask on the phone number textbox, i.e. XXX-XXX-XXXX. I'm using the AjaxToolkit MaskedEditExtender and MaskedEditValidator. The validator actually does display it's error message, but there is no mask on the textbox. I have the toolkit registered in the web.config, and everything else I'm using from it works fine. I did notice that I can't drag-and-drop the maskededitextender into the form, which seems odd: the maskededitvalidator dropped in fine. Here's the table cell that has the phone number controls: I'm really at a loss as to what's going on, and I'm beginning to wonder if it's an issue with the page or the toolkit assembly, or maybe just doesn't like me anymore.
Help about Controls   (212 Views)
Hi ... what are controls how can we add them and from where i can find different controls i have to make a site for mobile .. so my teacher told me that u will need some mobile controls... Thanx...
XAP or ASPX or Mixuture?   (180 Views)
I am using Silverlight since last 25 days and it changed the way of coding. I am embedding everything in xap which makes me little confuse. My Question: 1. To what extend we need to write the code in aspx 2. If I am developing and ASP.NET application with Silverlight what proportion of code normally I need to put in XAML considering all pages are fully powered by Silverlight pages.
Jquery issue   (188 Views)
,I am quit new in jquery. I have implemented the jquery autocomplete textbox, where I load data from SQL server. Upon selecting an item from the dropdown, I fill some controls on the form. I also want to change the text property of a button. Below is my jquery code:==========================================================CODE$(function () { $("#").autocomplete({ source: function (request, response) { $.ajax({ url: "/customers/customers.asmx/fncFetchCustomerList", data: "{ 'strFullname': '" + request.term + "' }", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", dataFilter: function (data) { return data; }, success: function (data) { response($.map(data.d, function (item) { return { value: item.Fullname, Firstname: item.FirstName, Email: item.Email } })) }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }, select: function (event, ui) { $('#').val(ui.item.Firstname); $('#').val(ui.item.Email); $('#').val("Update"); }, minLength: 2 }); });============================================================My problem is, upon changing the text property of the button to "Update", when i run a server side code and check for the text of the button, it doesn't read "Update"
Membership Login Control with Drop-Down Not Working!   (205 Views)
The main problem is there isn't a control on the page called LoginUser.However, I'd also be concerned that displaying a list of usernames on a login page isn't deemed a security risk. Mark,Darlington Web Design | Experts, Information, Ideas & Knowledge | ASP.NET Tips & Tricks
ASP.NET 2.0 Data Cache sort problem   (358 Views)
I query a table that creates a dataset in "lastname" order. I then bind the table to a datagrid that displays the data in the proper "lastname" order. When I move to a "record layout" page I create a datatable from the Cached table and I want to navigate is "lastname" order. Instead, the navigation is in "emp_id" order.GRIDEMP_ID LASTNAME FIRSTNAME5 A JOAN3 B JOHN1 C KEVIN AFTER RESTORING CACHE IN RECORD LAYOUT I GET THIS ORDEREMP_ID LASTNAME FIRSTNAME1 C KEVIN3 B JOHN5 A JOAN Page 1 (contains grid)strSQL = "SELECT emp_id, lastname,firstname"strSQL += " FROM EMPLOYEES ORDER BY lastname"dstSearch = New DataSet()conPubs = New OleDbConnection(connection_string)dadSearch = New OleDbDataAdapter(strSQL, conPubs)dadSearch.Fill(dstSearch, "C_EMPLOYEES")dtblSearch = dstSearch.Tables("C_EMPLOYEES")dgrdEmployees.DataSource = dstSearchdgrdEmployees.DataBind()Cache("CACHED_TABLE") = dtblSearchStep 2. On the grid I have a "Select" link that shows a page with detail about the employee. On the forms are and buttons. When I press the next and prev buttons, the cached data moves in "emp_id" order rather than last name.Page 2 Record LayoutSub Record_View()Dim dtblTemp AS DataTableDim dvwRecord AS DataViewDim RowIndex AS IntegerDim numrows AS INTEGER SESSION("PREV") = 0SESSION("NEXT") = 0SESSION("FIRST") = 0SESSION("LAST") = 0dtblTemp = Cache("CACHED_TABLE")numrows = dtblTemp.Rows.Count-1SESSION("FIRST") = dtblTemp.Rows(0).Item("EMP_ID")SESSION("LAST") = dtblTemp.Rows(numrows).Item("EMP_ID"))dvwRecord = dtblTemp.DefaultView()dvwRecord.Sort = Session("LASTNAME") RowIndex = dvwRecord.Find("EMP_ID")) IF RowIndex -1 THEN IF RowIndex > 0 THEN SESSION("PREV") = dvwRecord(RowIndex-1).Row(EMP_ID")) END IF IF RowIndex dtblTemp.Rows.Count-1 THEN SESSION("NEXT") = dvwRecord(RowIndex+1).Row("EMP_ID")) END IFEND SUB
web form variables [$name]   (193 Views)
I'm editing a shopping cart package and there are variables in the web form that appear like [$some name]. What kind of variables are these Here are some examples: CODE [$Home] [$Products] [$My Account] [$Contact Us] [$About Us] [$Policy] [$Affiliate] CODE --Rick
LoginStatus error using Blackberry device   (238 Views)
I'm very new to but put together a site which uses the LoginStatus control on each page. When accessing the site using a PC it seems to work fine but when users access the site using the web on their Blackberry devices they get an error when they click on the LoginStatus control to log out. The error says something like "Java Error: an error ocurred while executing the script" Any ideas or work arounds (ie better ways to log out).
security problem in   (205 Views)
hi! i am trying to upload asp net web site to goddady ...the site works good locally but than i upload it and try to brows i get : Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. i understand that the application at goddady hosting run at level so it's prevents from my dal.cs to execute queries to the data base how do i configure my classes to run at medium security level (how do i set premissions) i tried to use OdbcPermission class no succses ,i think i just do not know to work with it correctly the dal.cs code is : public delegate void errorWorkingOnDbHandler ( Exception e); public class Dal { #region datamembers public event errorWorkingOnDbHandler errorWorkingOnDb; OdbcConnection connection; OdbcCommand command; #endregion string cstr; public Dal( string ConnectionStr) { cstr = ConnectionStr; connection = new OdbcConnection (ConnectionStr); } public void OpenConection() { try { connection.Open(); } catch ( Exception ex) { if (errorWorkingOnDb != null ) errorWorkingOnDb(ex); return ; } } public void CloseConection() { connection.Close(); } public OdbcDataReader ExecuteReader( string SQLcommand) { try { command = new OdbcCommand (SQLcommand, connection); return command.ExecuteReader(); } catch ( Exception e) { onErrorWorkingOnDB(e); OdbcDataReader o = null ; return o; } } public void ExecuteNonQuery( string SQLCommand) { try { command = new OdbcCommand (SQLCommand, connection); command.ExecuteNonQuery(); } catch ( Exception e) { onErrorWorkingOnDB(e); } } public void onErrorWorkingOnDB( Exception e) { File .AppendText( @"c:\inetpub\wwwroot\Errors\Errors.txt" , e.Message + DateTime .Now.ToLongDateString() + " " + DateTime .Now.ToLongTimeString()); File .AppendText( @"c:\inetpub\wwwroot\Errors\Errors.txt" , Environment .NewLine); if (errorWorkingOnDb != null ) { errorWorkingOnDb(e); } } public object ExecuteScalar( string SQLCommand) { try { command = new OdbcCommand (SQLCommand, connection); return command.ExecuteScalar(); } catch ( Exception e) { onErrorWorkingOnDB(e); return null ; } } public void ExecuteTransaction( params string [] SQLCommandStr) { OdbcCommand SQLcommand = connection.CreateCommand(); OdbcTransaction transaction = null ; try { // connection.Open(); transaction = connection.BeginTransaction(); SQLcommand.Transaction = transaction; foreach ( string CommandStr in SQLCommandStr) { SQLcommand.CommandText = CommandStr; SQLcommand.ExecuteNonQuery(); } transaction.Commit(); } catch ( Exception e) { if (transaction != null ) transaction.Rollback(); if (errorWorkingOnDb != null ) errorWorkingOnDb(e); } finally { connection.Close(); } } }
Newbie Q: Trying to debug a handheld app   (186 Views)
I'm trying to run a hanheld app in visual studio 2005. I have set the drop down to "Pocket PC 2003 SE Square Emulator" but when I click on Debug/Start Debugging I get the following error:The operation could not be completed. The device is not connected.What am I missing , yep
Solution Explorer not selecting currently displayed file...   (191 Views)
I have a solution under which I have all of my projects with their complicated file-structures...I used to open say 4 or 5 files and as I selected one of these files (from the main pane), the file would get highlighted in my solution-explorer... however, for some strange reason, these files do not get highlighted in my solution explorer any more and it's really becoming annoying to debug and go through all these files...I'm using vs.net2005 attached to the evil called "source safe".
how to pass values from page to page   (315 Views)
greetings good experts.In classic asp, I would pass values via hidden form or query string.Can someone please show me how this is done in asp.netI am using version 2.0 and I am working with vs.2003So far, anything I tried has failed.I am trying to pass only 6 values from page1.aspx to page2.aspx. 2 of those values is checkboxList.Here is an example of what I am trying to do.CODEOption Explicit On Imports SystemImports System.DataImports System.Data.SqlClientImports System.XmlImports System.WebImports System.DrawingImports System.Web.UIImports System.Web.UI.WebControlsImports System.Web.UI.HtmlControlsImports System.Web.UI.PageImports Microsoft.VisualBasicImports System.Web.HttpApplicationImports System.Web.HttpResponsePublic Class _default Inherits System.Web.UI.Page Protected WithEvents txtAuthName As System.Web.UI.WebControls.TextBox Protected WithEvents txtservice As System.Web.UI.WebControls.checkBoxList Protected WithEvents txtcheck As System.Web.UI.WebControls.checkBoxList Protected WithEvents txtAuthJob As System.Web.UI.WebControls.TextBox Protected WithEvents txtAuthPhone As System.Web.UI.WebControls.TextBox Protected WithEvents txtservice As System.Web.UI.WebControls.CheckBoxList Protected WithEvents txtccCheck As System.Web.UI.WebControls.CheckBoxList Protected WithEvents btnSave As System.Web.UI.WebControls.Button Protected WithEvents txtAuthEmail As System.Web.UI.WebControls.TextBox#Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents service As System.Web.UI.WebControls.CheckBoxList Protected WithEvents ccCheck As System.Web.UI.WebControls.CheckBoxList Protected WithEvents AuthName As System.Web.UI.WebControls.TextBox Protected WithEvents AuthJob As System.Web.UI.WebControls.TextBox Protected WithEvents AuthPhone As System.Web.UI.WebControls.TextBox Protected WithEvents AuthEmail As System.Web.UI.WebControls.TextBox Protected WithEvents submit As System.Web.UI.WebControls.Button Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub#End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Me.txtAuthName.Text = Request.QueryString("AuthName") Me.txtService.Text = Request.QueryString("cService") Me.txtcCheck.Text = Request.QueryString("cCheck") Me.txtAuthJob.Text = Request.QueryString("AuthJob") Me.txtAuthPhone.Text = Request.QueryString("AuthPhone") Me.txtAuthEmail.Text = Request.QueryString("AuthEmail") End Sub Private Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Response.Redirect("requesters.aspx" + "&AuthName=" + Server.UrlEncode(Me.txtAuthName.Text) + "&cService=" + Server.UrlEncode(Me.txtCheck.Text) + "&cCheck=" + Server.UrlEncode(Me.txtAuthName.Text) + "&AuthJob=" + Server.UrlEncode(Me.txtAuthJob.Text) + "&AuthPhone=" + Server.UrlEncode(Me.txtAuthPhone.Text) + "&AuthEmail=" + Server.UrlEncode(Me.txtAuthEmail.Text)) End SubThis is not working.I am getting an error that the way I am doing checkboxlist is incorrect. Please. please help
Two Submit Buttons and RequiredFieldValidator ??   (173 Views)
I have a quick question about required field validators.I have a form for adding data and it's associated submit button. The fields have associated required field validators.On the same page I have a logout button.If I am on the form submission page and click the logout button then my required field validators fire for some reason and I can't log out :Execute permission denied on object 'SprocName'   (153 Views)
I have an ASP.NET application that uses Integrated Windows authentication. My Web.config looks like belowWhen users try to access my application, they get the below error:Execute permission denied on object 'SprocName', database 'DBNAME',Owner,'dbo'The Only way I could get rid off the error is if I set DBO permissions for the user group on the databse. Can someone suggest how to set up a security group with the necessary permissions on SQL SERVER (ie read,write execute Sproc etc) and not too many extra ones, like DBO
Session Timeout?   (165 Views)
hi,my session variables seems to disappear everytime something like this happens:Whenever there is a change in the .NET code(When i refresh the page after the change it simply logs out).Are there any other scenarios where session values disappear like this Known is handfull, Unknown is worldfull
AJAX Example - Google Suggest - Small Error?   (173 Views)
I am trying to work on the solution located here: Google Suggest Like Dictionary but I just can't seem to get it to work. Can someone please see what is wrong with my code This is what I have set-up: I have 2 aspx pages in VS.NET 2003 (no code-behind). Default.aspx is set as Start-Up Page. From the code below, you see that Default.aspx calls Find.aspx. This is a simple implementation (please read - it might look long, but it's mostly JavaScript).Can someone please assist me hereHere is my Default.aspx page:CODE var req;function Initialize(){ try { req=new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req=new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { req=null; } } if(!req&&typeof XMLHttpRequest!="undefined") { req=new XMLHttpRequest(); }}function SendQuery(key){ Initialize(); var url="Find.aspxk="+key; if(req!=null) { req.onreadystatechange = Process;"GET", url, true); req.send(null); }}function Process(){ if (req.readyState == 4) { // only if "OK" if (req.status == 200) { if(req.responseText=="") HideDiv("autocomplete"); else { ShowDiv("autocomplete"); document.getElementById("autocomplete").innerHTML = req.responseText; } } else { document.getElementById("autocomplete").innerHTML= "There was a problem retrieving data:"+ req.statusText; } }}function ShowDiv(divid){ if (document.layers) document.layers[divid].visibility="show"; else document.getElementById(divid).style.visibility="visible";}function HideDiv(divid){ if (document.layers) document.layers[divid].visibility="hide"; else document.getElementById(divid).style.visibility="hidden";}function BodyLoad(){ HideDiv("autocomplete"); document.form1.keyword.focus();} Here is my Find.aspx page:CODEpublic void Page_Load(object sender, EventArgs args) { string keyword=Request["k"]; if(keyword!=null && keyword.Trim()!="") { string sql="SELECT TOP 10 * FROM WordList WHERE Mean LIKE '" + keyword + "%'"; SqlConnection conn=new SqlConnection("server=localhost;database=db;uid=dbUser;pwd=priv;") ; conn.Open(); DataTable dt=new DataTable(); SqlCommand command=new SqlCommand(sql,conn); SqlDataAdapter adapter=new SqlDataAdapter(command); adapter.Fill(dt); conn.Close(); foreach(DataRow row in dt.Rows) { string meaning=row["Mean"].ToString(); Response.Write(""+meaning+""); } } }
insert into sql database issues   (169 Views)
I am trying to use 2 list boxes to insert values into a sql database. below is my code, but everytime I do I get the Application Error code.Private Sub cmdregister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdregister.Click Dim mydate = System.DateTime.Today Dim b_event1, b_event2, b_event3 As Boolean Dim findrows As Integer Dim totalregusers As Integer Dim regevent1, regevent2, regevent3 As String Dim strsql As String Dim added As Integer totalregusers = txttotalusers.Text regevent1 = lstevents.Items(0).Text regevent2 = lstevents.Items(1).Text regevent3 = lstevents.Items(2).Text findrows = lstregusers.Items.Count If findrows = totalregusers Then strsql = "INSERT INTO EventUsers (" strsql &= "fullname, event1, event2, event3, event1desc, event2desc, event3desc, subdomain, regsession, u_createdate) " strsql &= "VALUES ('" strsql &= lstregusers.SelectedValue & "', '" If lstevents.Items(0).Selected = True Then strsql &= "1', '" Else strsql &= "0', '" End If If lstevents.Items(1).Selected = True Then strsql &= "1', '" Else strsql &= "0', '" End If If lstevents.Items(2).Selected = True Then strsql &= "1', '" Else strsql &= "0', '" End If strsql &= regevent1 & "', '" strsql &= regevent2 & "', '" strsql &= regevent3 & "', '" strsql &= txtsubdomain.Text & "', '" strsql &= txtsession.Text & "', '" strsql &= mydate & "', '" strsql &= "')" Dim con As New OleDb.OleDbConnection("Provider=SQLOLEDB; Data Source=localhost;Initial Catalog=WebX; User ID=webuser; Password=password") Dim cmd As New OleDb.OleDbCommand(strsql, con) Try con.Open() added = cmd.ExecuteNonQuery Catch ex As Exception lblstatus.Text = "Error inserting record! " & ex.Message Finally If (Not con Is Nothing) Then con.Close() End If End Try lblstatus.Text = "record inserted" Else lblstatus.Text = "Your total number of users added is less than what you originally requested!" End If End Sub
IIS6 Not configured for .Net - Framework is installed   (320 Views)
A client of mine has Windows Server 2003..Net Framework 1.1 is installed.IIS6 is not configured to run .Net apps, the ISAPI mappings have no .aspx or .ascx and all the other files types for .net.In IIS6 is there a way to configure IIS without having to uninstall the .net framework an re-installing it
IIS Authentication   (195 Views)
In a .Net application you can use IIS to set to one ofthree settings for security. I just need somebody to confirm my understanding of the three settings.Anonymous - No authentication by IIS.Basic - The client must enter a username and password that exists on the IIS computer's windows machine. It is sent unencrypted to the IIS machine.Digest - The client must enter a username and password that exists on the IIS computer's windows macine. It is ent encrypted.WindowsAuthentication - The client must have entered a valid username and password that exists on the client machine and the IIS machine accepts this as a valid intranet user.Many
Fill DropDownList in EditItemTemplate   (227 Views)
I'm trying to programatically fill a dropdownlist that is an the EditItemTemplate of a DataList. I've tried to bind the data in the Edit Command event handler, but this handler only has access to controls in the ItemTemplate, not the EditItemTemplate. Does anyone know how and when to bind the dropdownlist
check for a datalist value   (252 Views)
hi ,I have this codes:I'm trying to test for the value of the last dataitem "type" and I want to display an image if the value for instance is "live_band"
Can't response.write an asp:Button control   (196 Views)
I need to write out the following control using response.write:Or an ImageButton. But it doesn't work. I can't see the control in the browser. And if I view --> source, I see the actual code:My code is within the form tags. The only thing I can think of is that you cannot response.write a server control. Is this correct And is there any way around thi
Textbox in ListBox/DropDownList possible?   (208 Views)
Is it possible to have a textbox situated at the bottom of an ASP.NET DropDownList (runat=server) I figured this would be a good way to allow entry of text fields in a "Other" textbox inside the DropDownList when the listbox entries do not show what is needed
Identifier Expected error in ASP.NET!   (254 Views)
void Page_Load() { sSql = " SELECT * FROM tblClient_Supervisor_List WHERE RepName ='" + Session["gUserID"] + "'"; OleDbConnection myConn = new OleDbConnection(strDSN);OleDbCommand myCmd = new OleDbCommand(sSql, myConn);OleDbDataReader dr = null;myConn.Open();recdr = myCmd.ExecuteReader(); With dlClientID; .DataSource = recdr; .DataTextField = "RepName"; .DataValueField = "ClientID"; .DataBind(); End With;}Here I am getting the error as "Identifier Expected".I don't know, What is the problem is..Compiler Error Message: CS1001: Identifier expectedIn this line-- With dlClientID;the error is coming. Could you find any error, please let me know
MS Office templates   (569 Views)
VS 2010 has Office 2010 templates for Microsoft Word. What is their function I am trying use an Access 2010 file that has a field that contains MS Word docs. I was wondering if I could use the VB Office 2010 templates
url encode not working for @ in email   (191 Views)
I am trying to pass several variables from a jsp page to a aspx page. This works fine using a link, a redirect, etc as long as my variable does not have @ symbol. I use Server.UrlEncode () on the string - it still does not work.I use a Replace on the string (replace @ with %40 - it still does not work.I get a 404 whenever there is an @ or %40 in the querystring. If I remove the @, (or the %40 after encoding), it all works fine.Is this a bug Has anyone seen this before I am using .NET 4.0If noone has any ideas I will just use a clunky method of splitting the email address, pass it in query string and then re-construct it at the other end.
FileUpload control resending   (200 Views)
Does anyone know how to avoid this problem using the file upload control. Everything works fine and uploads as it should, however if a link is clicked to navigate away from the page then click the back button on the browser I get a page expired and a retry message box. If I click OK the file gets uploaded again. I've tried this on a blank page and it does the same so theres nothing else to interfere with it. Anybody else had the same issue
ASP.NET 2.0.50727.0*** EVENT ID 1315 ****Event Code 4005**Auth Fails   (275 Views)
I am getting these errors all the time on our windows 2003 r2 server... and even thoe there informational they present a pop up box for the end user asking them to log back in. We recently had to rebuild our web server and since we did it wont go away also we renamed it. Any ideas i have done everything from security on folders ... IIS app pools (the old server was IIS 5.0) new one is (IIS 6.0)... change cookie expiration times etc..******Server Event id Below ---Windows Server (2003)******Event code: 4005 Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. Event time: 10/03/2008 12:34:28 PM Event time (UTC): 10/03/2008 1:34:28 AM Event ID: 4ce302731b964b7aa614cc487d264b67 Event sequence: 1937 Event occurrence: 49 Event detail code: 50202 Application information: Application domain: /LM/W3SVC/599050834/ROOT/STPORTAL-1-128495802221509867 Trust level: Full Application Virtual Path: /STPORTAL Application Path: E:\aspnet\StPortal\ Machine name: REDBACK Process information: Process ID: 7000 Process name: w3wp.exe Account name: NT AUTHORITY\SYSTEM Request information: Request URL: Request path: /stportal/default.aspx User host address: User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\SYSTEM Name to authenticate: Custom event details: For more information, see Help and Support Center at**********Client Error APP log (Windows Xp)******The kerberos client received a KRB_AP_ERR_MODIFIED error from the server $. This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named machine accounts in the target realm (), and the client realm. Please contact your system administratorCan any body help!!!!!!!!!!!!
Truncated date   (197 Views)
I have a DetailsView that's displaying a date. The field is of type datetime and the DetailsView displays it truncated.I've tried changing the column width and it does no good.It displays it as "May 9 200".See It's dropping the ending zero.I have tried using {0:d} and it does no good
Prevent User From Manually Typing Filename Using FileUpload   (251 Views)
Does anyone know of a way to prevent a user from manually typing the filename in the textbox portion of the fileupload control Is there a way to disable only the textbox portion, but still allow the user to use the browse butto
Populating a Multi Select Listbox from the Request Object.   (182 Views)
I have a form using VB.NET which submits data to the database and then posts back to itself and populates the dropdowns with the values I have just added to the database.I have a multi select dropdown called "drpCategory" which needs to populate the selected items from the request object once the form posts back to itself.I have the following code for a single select but this now doesnt work as I have multiple values.CODEIf Not Request(subcategory.ID.ToString).Equals(String.Empty) Then subcategory.Items.FindByValue(Request(subcategory.ID.ToString).ToString).Selected = True End IfSo i need to know how to amend this code for my needs.Thankyou in advance for any help!Mayoor
HtmlInputFile - add posted file manually?   (185 Views)
I have an HtmlInputFile object which allows a user to browse for a file to be uploaded. The file in question is always in the same place with the same name, so I was wondering if I can spare the user the hassle of browsing for the file by pre-filling the rendered input control... any ideas Tom
2 DB fields for RadioButtonList.DataTextField   (144 Views)
I have the following code:CODEDim tdr As iDB2DataReader = _mydata.GetEmpFutOptions(ssn, strYear, strType) rdlElectionOptions.DataSource = tdr rdlElectionOptions.DataTextField = "carrier" rdlElectionOptions.DataValueField = "valu" rdlElectionOptions.DataBind()How would I append a second DB field called "plan" to the rdlElectionOptions.DataTextField attribute The output should look like this:O Carrier - Plan NameO Carrier - Plan Name 2Is this possible mwa
Custom Config file Reset   (487 Views)
I have created a custom config file for my application to modify some global variables. It works fine, but when I modify the config file, it does not update right away. I have to reboot the server for the application to use the new file. How can I have the application use the updated file without having to reboot the server.
Custome Error Pages   (140 Views)
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages.Basically, my web application is configured to utilise a custom errors page, in that unhandled exceptions get passed through and the page redirects correctly as per the settings in the web.config file and Global.asax. This works in 95% or so of cases, however...On occasion, and not in any way I see to be replicable, the custom error handling in ASP.Net/IIS falls over and simply ouputs a standardised error page stating;Runtime ErrorDescription An Application error occured on the server. The current custome error settings for this application prevent the details of this application error from being viewed remotely (for security reasons). It could however be viewed by browsers running on the local server machine.Details To enable the details of this specific error message to be viewable on remote machines please create a tag within a "web.config" configuration file located in the root directory of the current application. The tag should then have its "mode" attribute set to "Off".Notes The current error page you are seeing can be replaced by a custome error page by modifying the "defaultRedirect" attribute of the applications configuration tag to point to a custom error page URL.Does anyone have any idea's of the cause of this, solutions to it, or workarounds Even suggestions would do at this point. As I said the application handles pretty much all errors gracefully, redirecting as appropriate and outputting the error details, but that 5% or so of cases where it doesn't is just baffling. Rhys""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."My Home
.Net Code Dis-assembly   (116 Views)
We had a programmer who is no longer with us delete some code from a project. I have found several Disassemblers to view dll source code. But are there any Disassemblers to actually retrieve the source code back into .net
Problem Sorting Datagrid   (101 Views)
I've been trying this for weeks to no avail. I'm attempting to sort a datagrid in my application. The datagrid has owSorting=True, and the following command exists to handle the sort...CODE Private Sub DataGrid1_SortCommand(ByVal source As Object, _ ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) _ Handles DataGrid1.SortCommand DataGrid1.DataSource = DsLogs.spLogsSelect.DefaultView.Sort DsLogs.spLogsSelect.DefaultView.Sort = e.SortExpression DataGrid1.DataBind() End SubHowever, when I click on a header column to perform the sort the datagrid data disappears. Could someone please help me figure out how to sucessfully sort the datagri
Find a string between two substrings   (291 Views)
Is it possible to locate and delete a string that is between two substrings including the two substrings even if the string between the two substrings changes all the timeSay my string is: (I know its lame but trying to keep it simple)"Paul wanted to go to the baseball game monday"Now say I wanted to always delete what ever was between "to" and "game". I can find "the" and "game" using inStr(), but after is there a way to use that to delete whats between them so my final string will be:"Paul wanted to go monday"So no matter what is between "to" and "game" the entire things deleted.
problem with pres button   (196 Views)
When I come to the page I get information from previous pagelike str=Request("str")then I put this str on the page also I have a buttonIf length of str =1596 when I press button all is working ( I can see a message that I have inside Sub Button1_Click)but if length of str=1776 when I press a button I don't receive my message )May be somebody can Help M
Disabling page via javascript   (298 Views)
Not wanting users to double-click buttons or navigate from a page after clicking a Save button I incorporated a javascript. The script loops through the form elements using getElementsByTageName('INPUT') then sets the element's disable property to true. I add an attribute to the Save button's onclick to call this javascript function.Problem is the server click event is not firing because the javascript runs before the Save buttons Server click event. I have wired the javascript call from the Save button using onmousedown, onmouseup but still get the same behavior. I figure the Save button itself is getting disabled then the server-side event is not firing so I altered the javascript to ignore the button that was clicked (the Save button) ... still get the same results ...any ideas
Using Functions in a module on ASPX pages   (138 Views)
I have a module where I keep all my common functions, now I want to use one of the functions like this in the page.aspx file: The function CONVERT_TXT is decalred pulic in the module.When I put the function in the code-behind of the page it works perfectly well, but when I keep the function in the module (which is public as well) it says that Name 'CONVERT_TXT' is not declared. Why is that
How to call a DLL from ASP.Net...something like this...   (250 Views)
I'm redoing an ASP code using ASP.Net..In the ASP code, i have a drop down box, ASP calls a DLL to get the values for the drop down box:bjLogin = server.CreateObject("ESPDatabaseAPI.Mode")rec=server.createobject("ADODB.Recordset")rec = objLogin.List()do while not rec.EOF %>
Summing a datagrid column???   (203 Views)
I've got a dataset and i bound to a datagrid. in this datagrid there is 17 columns. I want to summing a datagrid columns and show the result in footer. i tried the code i write below but i couldn't get the result:(int x1 =e.Item.ItemIndex;int x2 = DataGrid1.Items[x1-1].DataSetIndex;string name = ds.Tables[0].Columns[x2].ColumnName;for (int i=0 ;i < e.Item.Cells.Count;i++){if(name!=null && name.CompareTo("KolonOne")!=0){if (e.Item.ItemType== ListItemType.Item ||.Item.ItemType== ListItemType.AlternatingItem){Sum[3] += Convert.ToInt64(DataBinder.Eval(e.Item.DataItem,"GVM")); e.Item.Cells[3].Text+=e.Item.ItemType.ToString();}else if (e.Item.ItemType== ListItemType.Footer){e.Item.Cells[3].Text = String.Format("{0:#,###}",Sum[3]);}}}
Giving a TextBox control on a page load   (179 Views)
I have web page and a textbox on that web page. I was wondering if there is a way for textbox to start off as 'Selected' so the user can just start typing as soon as the page loads, rather than having to click in it before he starts to type.Steven