|
Hey guys, I'm trying to create html links of all URL's in a string. I'm calling the function below which seems to be pretty close to my needs, except for when someone enters a link followed by text directly after the url. Somebody with a 'proven technology' solution?
<br />
public static string LinkText(string Input)<br />
{<br />
Regex urlregex = new Regex(@"(http:\/\/([\w.]+\/?)\S*)", RegexOptions.IgnoreCase | RegexOptions.Compiled);<br />
string Output = urlregex.Replace(Input, "<a href=\"$1\" target=\"_blank\">$1</a>");<br />
Regex emailregex = new Regex(@"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);<br />
Output = emailregex.Replace(Output, "<a href=mailto:$1>$1</a>");<br />
return Output;<br />
}<br />
|
|
|
|
|
|
Hi all,
i want to know how to store image in SQL database from asp.net page then retrieve and display it in another page.
please answer me as soon
|
|
|
|
|
I would not recommend storing images in your database because of performance issues. Store the URL of the image instead and store the image itself just as a file somewhere on your webserver.
|
|
|
|
|
|
Thanks for your reply, this article toke about Windows Application and i need Web page, i think it differ, so if you know any thing please tell me
|
|
|
|
|
Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database.
if u want to save this file in database first u convert it to byte arrya nad save it.
In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX).
I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary
byte[] FileData;
FileData=FileUpload1.FileBytes;
and u can inert this binary arry to DB
I hope this ll help u
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
Saving image into database is not a good idea.I recommend u to save image ina specific folder and save its file name in the Database.
if u want to save this file in database first u convert it to byte arrya nad save it.
In the database(MSSQL 2005) the datatype of that filed is varbinary(MAX).
I hope you are using asp:FileUpload control for uploading the file.It have a proeprty named FileBytes, we can convert this file into binary
byte[] FileData;
FileData=FileUpload1.FileBytes;
and u can inert this binary arry to DB
I hope this ll help u
All I ever wanted is what others have....
CrazySanker
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
Hi ,
I need to implement breadcrumbs as an usercontrol in my website with directory structure.Please let me know the approach or useful links that will be helpful in creating the same.
In a datagrid that supports pagination,how can we display the first,last,prev and next pagee without the support of storedprocedures?
Any valuable suggestion appreciated.
Thank you,
Regards,
Deepa.
|
|
|
|
|
Use Data grid pages pagersetting and chood mode property =NextPreviousFirstLast
Naveed Kamboh
|
|
|
|
|
Hi Naveed,
I need to implement in a datagrid.I mean to ask whether we can customize the page mode property to NextPrevFirstLast.
Thank you,
Regards,
Deepa.
|
|
|
|
|
Yes ,thats what i told you how to do that!!!
Naveed Kamboh
|
|
|
|
|
|
Hi
I want to create a set up program for my web application.
My Requirements are the following:
1.I want to create a virtual directory in a place other than default virtual
directory.
in Installation window,it should have a provision for browsing a physical
location and making it the virtual directory (say for eg: D:/myWeb).
(can i get any possible method other than orcas? )
2.I want to create a new user group and add the current user account in
which my web application is running to this newly created group.i want to
give write permission for this group in LOG folder of my web application.(If
i get some sample code )
3.i want to create some tables and demo data in oracle(how can i do that one in set up ?)
|
|
|
|
|
|
Mr. Jagga
Problem is not clearl specified.
Do you have only one single master page in your application or you have child page which is using master page?
Please clearly specify your problem.
Naveed Kamboh
|
|
|
|
|
I have one Master page in the application 'Master.master"
Now, within my master page, there are two Usercontrols -
1) UC_Login -This is responsible for the user authenticationa and contains 'TextBoxes' and 'LinkBUttons'.
2) UC_Navigation - This contains the 'ImageButtons' that provide further navigation to different forms.
Application also contains 2 pages -
1) Default page - also the startup page for the application.
2) MySpace page - Just to provide the navigation.
Now when I execute my code I face a problem with my usercontrol-UC_Navigation (with the Image buttons)
When the default page is viewed in the browser, UC_Login is viewed fine, but the UC_Navigation is all stuffed up.
All the Images boxes are replaced by the text 'submit query'.
BUT, when navigate to the MySpace (after Logging IN the user gets redirected to the MySpace page), the UC_Navigation control is just working fine, even when navigate back to the Default page.
Therefore, I think there is a problem when the code is executed for the first time, it stuffs up the Navigation Usercontrol....
Thank you
|
|
|
|
|
Sorry but I am unable to give you any suggestion.
May be you have to put your code on page load event if there is any.in the following code block C#, i am nout sure about vb.net syntax, try this, may be this solve your problem
if(!IsPostback}
{
}
Naveed Kamboh
|
|
|
|
|
I've tried that, but NO good...
I think its the way the default page is loaded that.
anyways, thank you for you help
|
|
|
|
|
Hi guys,
I have a Datalist on a page that I am using to displya data from a DB.
I have it set
<asp:DataList ID="dlDisplay" runat="server" RepeatColumns="3" DataSourceID="objDataSource"<br />
EnableViewState="False" OnItemDataBound="DataList_ItemDataBound" OnItemCreated="DataList_ItemCreated" RepeatLayout="Flow">
The problem is currently my Data is being displayed in this order :
1 4 7
2 5 8
3 6 9
I would like to display it in :
1 2 3
4 5 6
7 8 9
I can't seem to find a property I can set it too, so I was wandering if there is something I am missing?
|
|
|
|
|
Please ignore my question the answer was too simple
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.repeatdirection.aspx
|
|
|
|
|
Hi,
I have a web application, in which user will be able to select different time slots like 10-11, 11-12 etc.
The problem is that i want to convert/store the data in users time format. ie when user select 10-11 ,and if the user is in any of Indian time zones,or in any other time zones i have to convert/store the data(10-11) to the corresponding time zone.
Is it possible in asp.net. will you guys please give any hints...
thanks in advance
sebastian
|
|
|
|
|
Always store time in the same zone, usually UTC. Only convert it for display.
File Not Found
|
|
|
|
|
Thanks, but is there any specific method to convert it. or we manually convert it?
Thanks
Sebastian
|
|
|
|
|
DateTime.ToLocalTime and DateTime.ToUniversalTime. Beyond that you will have to use the Globalization classes.
File Not Found
|
|
|
|