|
I have 5 different domain alias for my website; I want to know the alias in my asp.net code and want to display the page accordingly; say
For alias "http://aliasIndia" I want to open India.aspx
For alias "http://aliasCanada" I want to open Canada.aspx and so on.
My question is how do I know by which alias user came to my website so I can redirect to proper page; right now for each alias my default page is opening.
|
|
|
|
|
Check the URL (Request.RawURL). Look for the text and redirect to proper page.
|
|
|
|
|
The Page.Url.Host property returns the domain name that was used to get to the site.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello
How i can retrieve from the combobox the DataValueField of a selectedItem
Please Help
And Thanks in Advance
Assaf
|
|
|
|
|
Use like this
Combobox1.Selectedvalue
Sathya
|
|
|
|
|
Hi,
I created one user control. Now i am trying to placing that user control either in the master page or in the .aspx page that time i am getting an error in the design mode and the error is "an unhandled exception occurred request is not available in this context".
If any body knows the solution please let me know.
I registered that user control in the .aspx and master page, But still i am getting the above mentioned error.
Thanks and Regards
RakayaD
|
|
|
|
|
Here[^].
Also check out the article I link to in my sig.
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 ,
I want to use LoginStatus control in master page.
How do i use LoginStaus Control in master page without ' Membership provider' and with out 'Configure Security Using the Website Administration Tool '.
What are the changes to be done on web.config.
i have not used any Login Control for Login. I designed a separate page for Login. 'LoginPage.aspx'.
Thanks in advance.
|
|
|
|
|
Hi,
I am developing a web application in which the customer/user register(enter)with their complaints. When the End user enters all the required data and clicks the Register button automatically a unique number should be generated. For instance the number should be in the format like 23/Mar/2008/001 and for every new user the number should be incremented if according to the system date. If the system date changes then the number should be start again from current date/001........
Thank you
Dsr
|
|
|
|
|
So what do you want to know? How to do it? Where, in a database or in the web app?
Please try to help yourself by being specific with what you want - nobody else knows what you are working on
Bob
Ashfield Consultants Ltd
|
|
|
|
|
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?
|
|
|
|