Sorry my bad ;P
bcozican
Posts
-
get the value of the selecteditem in a list view -
get the value of the selecteditem in a list view:~ listview.items[0].subitems[0] refers to the second column in the listview. listview.items[0] refers to the first column. Or am i missing something..?
-
get the value of the selecteditem in a list viewHi prasadbuddhika, Try listview.items[rowIndex].subitems[IndexOfColum] items[rowIndex] returns the first column and subitems[0] is the second column etc... Hope this helps...
-
Use of Doublequotes in a string... but it doesnt work?When you say output, you mean the watch window of the debugger..? The watch window of the debugger always shows the backslash before the double quote as an escape character but it will not display in your actual results. Try this by setting a label or textbox's text to the string value. You will see that there isnt a backslash in the text. Hope this helps...
-
Use of Doublequotes in a string... but it doesnt work?Hi Matjaz, The following line of code will insert a double quote in your string value. string xc = "Deklica je po \" Vodo šla."; Hope this helps...
-
Hide in Task Manager.Its not possible. Any application running will show as a process in task manager. And I agree with Simon, the user should always be in control of his/her pc. Would you not want to be able to kill something when it lets your pc freak out..?
-
HTML Table in asp.netThere is a colspan property on the HtmlTableCell object. HtmlTableCell td = new HtmlTableCell(); td.ColSpan = 2; Hope this helps.
-
set value from page to webusercontrol textboxThe object reference not set an instance of object tells me that it either cannot find the myusercontrolpage control on you page or the TextBox5 control on your objTestControl. Debug and see where it happens. Depending on how your control works you can expose the textbox text property as a property on you control that returns and set the textbox value. Just an idea...
-
How to remove dots from space in C# editor?Go to the 'Edit' menu, select 'Advanced' and then 'View white space'. This enables and disables the dots.
-
How can we keep calling OnStart() in Started condition of Windows Service in C#Create a global Timer instance like System.Timers.Timer or System.Threading.Timer in your service class that you enable and start in your OnStart() event. Then every time the timer event fires you can perform your logic you need to. And you can set it to fire as often as you like. Hope this helps.
-
read xmlTry the code below: string xmlFilePath = @"C:\Persons.xml"; System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); doc.Load(xmlFilePath); System.Xml.XmlNode pNode = doc.SelectSingleNode("persons"); for (int i = 0; i < pNode.ChildNodes.Count; i++) { System.Xml.XmlNode personNode = pNode.ChildNodes[i]; for (int x = 0; x < personNode.ChildNodes.Count; x++) { string value = personNode.ChildNodes[x].InnerText; } } Hope this helps.
-
asp.net role managerThe .Net Membership doesnt have build in auditing so you will have to create a log table and classes to log data in it yourself. Audit.Login.Log() is my own function that I created to log the audit entry.
-
asp.net role managerSure, if you are using the login control then implement the Authenticate event of the Login control. Else do it whereever you are authenticating your user. I think the code below does what you want to accomplish: protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { string Username = this.Login1.UserName; string Password = this.Login1.Password; if (Membership.ValidateUser(Username, Password)) { Audit.Login.Log(Username, Audit.Login.eStatus.Success, Audit.Login.eSource.AdminSite); e.Authenticated = true; } else { Audit.Login.Log(Username, Audit.Login.eStatus.Fail, Audit.Login.eSource.AdminSite); e.Authenticated = false; } } Hope this helps.
-
asp.net role managerThe asp.net login control uses the MembershipProvider to authenticate the user. Using the System.Web.Security.Membership.ValidateUser() method to authenticate the user will automatically update the lastactivitydate field when authenticating the user.
-
Query HelpOne way to do this is to create a function where you pass in an id that returns a comma seperated string of account numbers for that ID. Then your query would look something like SELECT iAccountID, iViolatorID, Count(iViolatorID), GetAccountNumbers(iViolatorID) AS AccountNos FROM tbTempQNotificationRequest This will slow down the query a bit but it'll work. Hope this helps.
-
Database design Questions?I would recommend you have a Member table and an Advertisement table on with a memberid field which is the member's id who uploaded the advert. A VisitHistory table that contains the Advert id, member id and maybe datetime with foreign keys to the member and Advertisement tables. A table with main categories like cars, mobiles, houses etc and then a table with subcategories with a parent id on it which will be the foreign key to the categories table that filters the subcategories for each category. That way you can have all these main categories with all their subcategories and easily add new ones if you want diffirent kinds of adds. This is obviously high level without any indexes or anything but I hope you get the idea. Hope this helps.
-
Design my DatabaseYes, sorry my bad for not be more clear. :-O
-
Design my DatabaseHow about right here..?
-
Controlling the Scorlling inside a table (ASP.NET)In the "<%@ Page >" tag of your page put the tag MaintainScrollPositionOnPostback="true". That will let the page return to its original scroll position after a postback. Hope this helps.
-
PrintingCheck out: http://www.ondotnet.com/pub/a/dotnet/2002/06/24/printing.html Hope this helps.