.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Change url format

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net
 

Hi everybody,


I have a Url with in the url a returnUrl. I would like te make a method which change the method to another structure. See below an example of the incomming url and the output:


Incomming url:

HttpContext.Current.Request.Url.ToString()
http://dealerc.webshop.com/Pages/login.aspx?CatalogusNaam=dealerc&ReturnUrl=http://dealerc.webshop.com/default.aspx?CatalogusNaam=dealerc


Output url:

https://order.webshop.com/dealerc/Pages/login.aspx?ReturnUrl=https://order.webshop.com/dealerc/default.aspx

As you can see in the example above, I would like to change http to https and change the host to order.webshop.com. And add the subdomain dealerc to a foldername after the host. And I would like to filter the querystring on the CatalogusNaam (I would like to remove it from the querystring).


Can someone help me with a method to do this. Below you can see some properties with their values:


HttpContext.Current.Request.Url.Host
dealerc.webshop.com

HttpContext.Current.Request.Url.AbsolutePath
/Pages/login.aspx

HttpContext.Current.Request.Url.Query
?CatalogusNaam=dealerc&ReturnUrl=http%3a%2f%2fdea


View Complete Post


More Related Resource Links

change format by formula

  
Hi, Do you know how can I change the format according to a field? I tried this, but obviously it doesn't work: =IIF(IsNothing(Parameters!s_contactsvisited.Value), countdistinct(Fields!contactid.Value), (Code.CalcPct(CountDistinct(Parameters!s_contactsvisited.Value), countdistinct(Fields!contactid.Value)),"P0"))   Thanks a lot

how to change date format

  
Hi,   I am using Oracle 10g im my asp.net project. In my select query, i want to change the format to dd/mm/yyyy hh:mm:ss from mm/dd/yyy hh:mm:ss. The field datatype is date. How can i write a query for this?

how do i change date format??

  

hey Guys,

I have a table with a date field that had date saved in the format of
yyyy-mm-dd, what i want to achieve is when I display them I want them to be displayed as an example "September 05 2009" format. can anybody help me with this??

Thank you very much.
Chetan


How to change the date format using AJAX calendar control tookit

  

I want to desplay date like (21-Sep-2010)



How to change a date format in GridView?

  

Hello all,

I'm new here - just started, and already have a problem...

 

From the database - 2 of my GridView cells: From Period, and Till Period - retrieve dates in the format YYYYMM - that is: just Year and Month. For Example:

Databound
Databound
Till Period
From Period
Databound

  200008 200005

  200011 200009

 

I want for the date to be displayed in the Grid at the following format MM/YYYY - that is:

Date Format Change in GridView

  

Hello all,

I'm new here - just started, and already have a problem...


From the database - 2 of my GridView cells: From Period, and Till Period - retrieve dates in the format YYYYMM - that is: just Year and Month. For Example:

Databound
Databound
Till Period
From Period
Databound
Databound
Databound
Till Period
From Period
Databound

  200008 200005

  200011 200009

 

I want for the date to be displayed in the Grid at the following format MM/YYYY - that is:

Databound
Databound
Till Period
From Period
Databound

How to change data format in result coming from SQL table

  

On one of my webpage i am displaying datalist in which i am using this label:

<asp:Label ID="nameLabel12a" runat="server" Text='<%# Eval("CreatedOn") %>' />

This label is displaying created on date along with time (10/18/2010 2:45:07 PM), but i would like to display it something like this:

7sec ago

20min ago

30min ago

23 hours ago

10/3/2010 (if the time is more than 24 hours then it should display the date)

how to accomplish this ? please guide me...


Regional settings (locale) in SP - is there any way to change that settings? eg. date format

  
The system I use is MOSS2007. I have regional settings set to "Polish". The default date format is yyyy-mm-dd, what is wrong because usually is dd-mm-yyyy. Is there any way to change specific regional settings? I couldn't have found it on internet. I've tried to change to "French", which gives me dd-mm-yyyy, but then eg. in calendar I have days and months in French language :)

Change the date format of calendar web part

  

Hi,

I have displayed summary view of calendar web part and want to change the date format from 10-24-2010 to 10-24 I don’t want to display the year can anyone help me please

Thanks


Change date format

  

I am getting date on my aspx page as

10/22/2010 11:52:07 AM


How can i change the format so that i becomes:

22 Oct 2010 11:52 AM


Thanks



Plz help me to change date format

  


<ItemTemplate>
                <div style="width:100%; height:150px; background-color:#cae2eb;">
                    <div style="float:left; margin-left:10px; text-align:center; height:150px; width:400px; margin-top:5px;">
                        <p style="font-weight:bold; padding-top:10px;"><%#DataBinder.Eval(Container.DataItem, "EventFrom").ToString("MMM dd, yyyy")%></p>
                        <p style=&quo

Change the format of List Alert subscription Notification

  

When we subscribe to any list item for alerts we get an email message for confirmation of successfull subscription.

 

the email  looks like below :

 

Subject : You have successfully created an alert for 'Team Discussion: Topic 1

 

Body ;

Alert 'Team Discussion: Topic 1' has successfully been added on 'Test Site'.

You will receive alerts in e-mail. The timing and criteria for the alerts depend on the settings entered when the alert was added.

You can change this alert or any of your other alerts on the My Alerts on this Site page.

 

I wish to change the format of this email. Any Inputs ??

 


Change the name format of the welcome menu

  
I sharepoint site we have a Welcome menu that shows the AD name .How can we customize it to show the first name and last name.is there any way?

How To Set a Date Format In GridView Using ASP.NET 2.0

  
A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.

How to format and update GridView and DataGrid rows using JQuery

  
The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

How to format datetime & date with century?

  
Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.

http://www.sqlusa.com/bestpractices2005/centurydateformat/

Program for Format Conversion of An Image

  
.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend