Topics
-
-
- Administrators
- 2 replies
- 806 views
Hi, How can I check how many "/" is in a string, JUST with .net functions? Is there a straight way without looping? Thanks.
Last reply by techmanbd, -
-
-
- Administrators
- 2 replies
- 1.8k views
Hi, I am getting a URI address from user, something like: http://www.domain.com/images/logo.jpg How should I quickly validate the user entry by checking it online to see if the file exists on the remote server or not? Thanks!
Last reply by ADO DOT NET, -
-
-
- Administrators
- 1 reply
- 1k views
Hi, I want to check if my user is admin or not? IF not, give him a nice error and End my application! I only need to run this in Windows XP, Vista and Server 2003 ! I have these 2 codes: CODE 1: If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then End End If CODE 2: Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent()) If wp.IsInRole(WindowsBuiltInRole.Administrator) = False Then End End If I just wanna know which one is correct and better to use for me? What's the different between these two? Thank you.
Last reply by PlausiblyDamp, -
-
- 1 reply
- 1.1k views
Using Visual Studio 2005 Professional: In Design View, the Properties window has a Description pane that resides at the bottom. If the Description pane is not visible, simply right-click anywhere in the Properties window and select the Description item. Mine is selected (i.e. it has a check next to it), and I like to keep it set at about 3 or 4 lines tall by dragging the splitter bar to for the Description pane. In this particular copy of VS2005 Pro, the height of the Description pane resets itself to very small or zero every time I open the application, and I have to struggle to get it to display again. Is there a setting somewhere in VS2005 Pro that I nee…
Last reply by techmanbd, -
- 0 replies
- 1.2k views
I use Visual C++ and .Net 2.0. I have 2 listViews, lv1 and lv2. All in Details View. If I use the MouseWheel to scroll / use the listView scrollbar to scroll the content (Horizontally or Vertically) on either lv1 or lv2 then the other will synchronized (scroll at the same time). How to do that since the listView does not have any Scroll related event? I have successfully Scroll both listView but I must use Buttons, button1 for scrollup and button2 for scrolldown and they only scroll vertically like this: [DllImport("user32.dll")] static bool ShowScrollBar(System::IntPtr hWnd, int wBar, bool bShow); [DllImport("user32.dll")] static…
Last reply by chrisliando, -
- 1 reply
- 830 views
Hello everyone. I am coming back into VB programming, after being away since VB6. Starting out with VB2008 Express Edition. I am trying to write a program that will be able to detect if my smartphone is plugged into the computer. This is just the start of the application, but it is a already showing to be a difficult process. Most of the information that I have found so far have been able to detect if a USB mass storage device is plugged in, by checking drive letters and such, but this won't work for the smartphone, since it isn't assigned a drive letter. Thank you guys for any help you can provide. FC
Last reply by Fork501, -
-
- Administrators
- 2 replies
- 1.9k views
Hi, I tried to connect DB2 database using ADO.Net in C#. It connected successfully. However, I would like to close the database at 'finally' block. When I tried to close the connection at "finally" block, it is showing an error saying "Use of unassigned local variable" Cant we close the connection in Catch or finally part in Try & Catch block. I have pasted my code below. Error is coming in the catch and finally section Am I doing in wrong way? private void button1_Click(object sender, EventArgs e) { OdbcConnection MyDBConn; String ConnString; try { ConnString = "Dsn=comp1;uid=use1;pwd=p…
Last reply by Arul, -
-
- 3 replies
- 1k views
Dear All, I am very new to .Net Framework. I dont have any experience in .Net framework at all, but having 9 years of experience in VB6 and 5 yrs experience in Oracle (PL SQL) Now, I want to learn Visual Studio 2005 and would like to start with C# (Dont like to start with VB.Net, though it may be easy for VB6 developer). I need great help from you. My Goal is developing ASP.Net pages by using C# 2005. Please note that I dont have any experience in ASP too (But know HTML and DHTML) 1. Please suggest a good tutorial to start learning C# 2005 (It would be nice if you suggest VS2005 rather than earlier version of C#) 2. Is there any FREE online books available for…
Last reply by Machaira, -
-
- Administrators
- 6 replies
- 1.6k views
OK so have a default.aspx page. All I have in this page is a div <div id="test" runat="server"></div> doing some little magic in code behind I can insert html into that div. Ok. What I want to do is to insert a whole page.html there and after the page is inserted, work with the <div runat="server"> from the page.html let's say the page.html looks like this: <div id="id1" runat="server"></div> <div id="id2" runat="server"></div> first I want to replace the "test" div with the content from the page.html . then I want to use the id1 and id2 divs to work with .innerhtml = etc (I'm trying to do some kind…
Last reply by Fork501, -
-
- 1 reply
- 752 views
I've created an FormView template that collects records from an SQL database. And I've stated that my FormView is pagable. Now my question is, how do I save a text from an label inside that FormView items to a string in a code behind? The problem is that in code behind I cannot see the label objects inside that FormView. I can see FormView object itself. So I'm not shure if I can via FormView object, see a collection of objects inside it and manipulate with them in runtime like this: FormView1.Items.lblName.text = "some other text" This of course isn't the right syntax, but I was wondering if there is something like this that I can use? For example: I have an…
Last reply by ttkalec1, -
-
- Administrators
- 5 replies
- 1.3k views
Hello, 1. In which Windows versions "Application Data" path is available? 2. In Windows versions that do not have this path, what should I do? Thanks :)
Last reply by PlausiblyDamp, -
-
- 1 reply
- 853 views
Hi, I have build a site that relies on forms authentication and this is how my web.config looks like: <system.web> <customErrors mode="Off"></customErrors> <authentication mode="Forms"> <forms name ="hosteseAuth" path="/" loginUrl="login.aspx" protection="All" timeout="30"> <credentials passwordFormat="Clear"> <user name="jeff" password="test" /> <user name="mike" password="test" /> </credentials> </forms> </authentication> <authorization> <deny users="?" /> </authorization> it all works just fine, but I don't understand…
Last reply by ttkalec1, -
-
- Administrators
- 8 replies
- 1.9k views
I have a COM object written in C++ whose class has functions that i am trying to invoke. I am able to instantiate the object and call some functions on it. However, I am stuck at calling one function which keeps giving me a COMException. Looks like it does not like the signature created in the Interop. I tried creating an IL manually from the type library dll, editing it by adding "preservesig" and readding it, but does not help. I have included the actual source, the IL equivalent and the CSharp code for it. In the original source code: HRESULT Read([in] LPUNKNOWN pPos, [in] long pBuffer, [in] long lBufferLen, [out] long * pData, [in] LPUNKNOWN pInfo) This …
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 779 views
In my ASP.Net project we use LDAP for authentication purposes. I want to enforce following security policies. Mandatory password change at the time of first login Mandatory password change after specific time My question is, is there any way I can delegate this policy enforcement on LDAP side, so when user tries to log in for the first time if LDAP throws some error code which signifies that this login is used for the first time, similarly if user has not changed the password since say for one month, at the time of login if LDAP can throw some other kind of error code to indicate this policy. So basically, can LDAP enforce these policies and send the error code …
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 3 replies
- 1.5k views
Hi all I am using the aspnet_regiis set of commands to create and a provider and encrypt/decrypt the connection string in a web.config file. The problem that I am having is that I generate the key on one machine and encrypt the config file. I then export the key and import onto my server, and assign the relevant permissions. I now want to remove the key so that nobody can look at the web.config file and be able to simply run the decryption command to see the connection string. Here are the commands that I use: 1. generate machine level rsa key Aspnet_regiis �pc �CustomKeys� �exp 2. Encrypt the connection string Aspnet_regiis �pe �connectionStrings� �ap…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 1.5k views
I have a propertygrid in my project and in this I have a text/string valve which the user can just enter text in. However I also have a text edit form that I have created, is there a way that I can customise the property value so that the user can enter text as normal but also display a button in the value field that if the user clicks on the button then it will display my custom text edit form form? If someone could help me with this then that would really be appreshiated, I have posted the current code below, and just for reference I am using VB.Net <CategoryAttribute("Text"), _ Browsable(True), _ [ReadOnly](False), _ BindableAttrib…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 4 replies
- 1.1k views
Hi, I'm experiencing a strange effect. I have a form with a backgroundimage set to a jpg in the relative property. I can see the image in the form ind the IDE, but when I start application the form has the system grey color and no image is displayed. I wrote several apllications and this is the first time it happens. Any suggestions. Thank you in advance. Kromax
Last reply by kromax, -
-
-
- Administrators
- 4 replies
- 1.5k views
I'm sure it's something simple that I'm overlooking, but can someone tell me how to do a redirect to another page from within a web part? Thanks!
Last reply by Machaira, -
-
-
- *Experts*
- 3 replies
- 2.7k views
In my datagrid , there is a column display the boolean data from database filed ( True/False) . Instaed of True/False, I would like to format the boolean data to Yes/No or checkbox . How to implent this function ?
Last reply by Fdonnel, -
-
- 1 reply
- 935 views
hi there, i am using asp.net 2005. i wanted to create a login application where the user will enter id and password. if the login is valid he must be redirect to the next content but in the same page. can anyone help me how to write such application Any reply is most apprecable Thank you Jitesh Programmer .Net Consulting
Last reply by Machaira,
-
Who's Online 1 Member, 0 Anonymous, 51 Guests (See full list)