|
I want, how to do it? And in the database.
|
|
|
|
|
Hi Mcmilan,
You can have a logic like this .. try it out .. could be helpful,
Before that following code part gives
--SQL SERVER 2005 code assuming that this ID will be generated at the time of insertion of values into DB
declare @currDate varchar(20),
@NextID varchar(20)
select @currDate = replace(convert(varchar,getdate(),106),' ','/')
print @currDate -- PRINTS 23/Jun/2008 FOR TODAY !!
Pseudocode ..........................................
set @CurrentDate = select replace(convert(varchar,getdate(),106),' ','/')
select @MaxuserID = Max(UserIDColumn) from UserTable -- Consideing your table name is "UserTable" and Column name is "UserIDColumn"
if(@CurrentDate is a SUBSTRING of @MaxuserID)
{
get @dateExcludedIndexPart from @MaxuserID -- here you should get 001 from "23/Mar/2008/001"
@dateExcludedIndexPart++
@NextID = @CurrentDate + @dateExcludedIndexPart
}
else
{
@NextID = @CurrentDate + '001' -- First ID value of the day ..
}
I know there could be more better algo for your requirement !!! But you can give a try ...
Thanks,
Arindam D Tewary
|
|
|
|
|
Thank you Arindam D Tewary,
I have one more doubt ,...where should I write the code? In stored procedure or in aspx.cs page............
Please help me in this...
Thank you
Mcmilan
|
|
|
|
|
It should be in SQL server!! I have already mentioned that in reply ...
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi I have a trange requirement which is as follows:
I have a HTML file with records which looks like a List View in ASP.NET. Please note that it is like a List view and not like a Datagrid.
But this is inside a single table.
I have to take this data and export it to excel in a DataGrid type of view.
One more problem i see in this HTML file is, say suppose there are 200 records which is displayed in that List view, if the first record has values, the second might have 12.
So the resulting excel sheet should have columns with maximum colums what the List view had.
HTML looks something this:
lt;table class='basic' width='100%' border='1' cellspacing='0'><tr class='header'><td valign='top' colspan=2 width='15%' class='sectionHeader'>Properties</td><tr><td valign='top' width='15%'>SI_ID</td><td valign='top'>15314</td></tr><tr><td valign='top' width='15%'>SI_NAME</td><td valign='top'>B&amp;C Share Top Dealers by Fund</td></tr><tr><td valign='top' width='15%'>SI_OWNER</td><td valign='top'>sweekev-a</td></tr><tr><td valign='top' width='15%'>SI_PARENT_FOLDER</td><td valign='top'>6294</td></tr><tr><td valign='top' width='15%'>SI_UPDATE_TS</td><td valign='top'>2/13/2008 4:59:01 PM</td></tr><tr><td valign='top' width='15%'>SI_CREATION_TIME</td><td valign='top'>2/13/2008 4:59:01 PM</td></tr><tr><td valign='top' width='15%'>SI_KIND</td><td valign='top'>Excel</td></tr><tr><td valign='top' width='15%'>SI_PROGID</td><td valign='top'>CrystalEnterprise.Excel</td></tr><tr><td valign='top' width='15%'>SI_FILES</td><td valign='top'><table class='basic' width='100%' border='1' cellspacing='0'><tr><td valign='top' width='15%'>SI_PATH</td><td
|
|
|
|
|
Biju Sam wrote: export it to excel in a DataGrid type of view.
So, you need to take your data source, use it to create an Excel file, then send it to the client.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
Though I didnt get your problem very nicely .. But still I would try to help you out from what I understood ..
1.Use some Regular Expression to extract all data( I suppose in side each cell of your HTML table is your data right?), which you need to show in each cell of your excel.
2.using Extracted data create an XML.
3.Export the XML values to datagrid or Excel what ever you required.
Thanks,
Arindam D Tewary
|
|
|
|
|
do u have ay link to implement the window authentication(active directory)?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
[^]
Thanks,
Arindam D Tewary
|
|
|
|
|
You mean to say, you want to authenticate with system login information. Like authenticating using Active directory server in your application..?
|
|
|
|
|
yes
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Use LDAP provider to connect to ADS Server and Validate the username and password in the server, If it is correct it will return true/valid otherwise false....
ex:
DirectoryEntry("LDAP:/dc=name, dc= domain name, ou=....");
Hope it helps for you..
|
|
|
|
|
Dim entry As New DirectoryEntry("LDAP://" + "192.168.1.16", "shadow-16", "pankaj")
the first parameter is ip address
second is full computer name , the system properties in my computer
third parameter is window password , my log in to the computer , window ask me the password.
Am i going correct ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
dont give computer name, computer name is given in place of IP addrdss, u can connect through IP address/ Machine name..
use the folloeing code..
Dim entry As New DirectoryEntry("LDAP://" + "192.168.1.16", "User Windows Login Name", "User Password");
if this answer is usefull please mark this as Useful.
|
|
|
|
|
Hi
I have a Setup file in the server I need to run that setup in the user machine through Web page In ASP.Net using C#.Net.
Can anyone please help me to solve this issue?
|
|
|
|
|
Provide a link to the setup file and then ask the user to run it once downloaded.
|
|
|
|
|
Can i able to run that exe without downloading to user's machine..
or I have to get a popup to run or cancel the setup, Like for Symantic antivirus we can install that software through webpage.
is there any solution for this..?
|
|
|
|
|
vinaykskvs wrote: Can i able to run that exe without downloading to user's machine..
NO. Your web page won't get write access to the client's machine.
|
|
|
|
|
vinaykskvs wrote: Can i able to run that exe without downloading to user's machine..
Just how do you think the internet actually works? That is like asking: how do I read a book, but at the same time leave it closed on the bookshelf?
|
|
|
|
|
asp.net is ran at the server, you cannot run it on someones machine
please read up on what asp.net does
We are not a Code Charity
|
|
|
|
|
But i kept that exe File in the IIS, I can able to run it on others machine, But i will get a message to Run or Cancel dailouge
how to avoid this..?
|
|
|
|
|
vinaykskvs wrote: But i will get a message to Run or Cancel dailouge
how to avoid this..?
You can't. A user MUST give permission to allow an exe to be installed. Anti-virus software is slightly different in that you give permission during setup, it is the setup you are trying to achieve here.
If you did not have to grant permission your PC would have even more viruses, malware and other bad things than it currently does. It is a basic tenet of the internet that a web page CANNOT install anything on the client machine without permission.
Hopefully this will clarify things for you.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
can any one give me a idea how to block third party .exe using asp.net. plzz
|
|
|
|
|
Can you give a bit more detail please?
We are not a Code Charity
|
|
|
|
|
sir i want to block any third party .exe from runnig on computer . For example i want to stop running .exe of winamp can u suggest me any alogrithim or any idea how can i go for it in asp.net .
|
|
|
|