|
Here I want to replace string.
e.g My string is
"Add new message in newthing"
here I want to replace "new".But when I used string.replace then it replaces
"newthing" also.In short I want to replace whole word.
Swapnil Bhavsar
|
|
|
|
|
Do the replacement using a regular expression for the word, where you add the word boundary code before and after the word:
theNewString = new RegEx("\\b" + RegEx.Escape(theWord) + "\\b").Replace(theString, theReplacement);
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Hi, I am creating a forum and I am in great problem. I need to make an access that the users can upload their picture as a logo of their names. How can I make this happen? They upload their pictures and the picture I want it to be saved in their profile.
Any help pls?
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
|
This must be homework since the exact question has been posted my a few different people.
|
|
|
|
|
Hi,
How can i send a parameter from my ASPX form, to a RDL Report?
Thanks.
|
|
|
|
|
I know that when there is a postback, id's for dynamic controls get re-created and they change. i know that we all get null reference exceptions when we try to retrieve them. I only have one problem that i tried looking for a solution on google but havent found it.
I have a aspx page with a list of link buttons databound to a collection taken from a database. on the right of that is a user control.
In that user control i have all these properties where GUID's are assigned every time some clicks buttons to re generate a new form to display. I get that null reference exception when i try to retrieve the values of the controls before the form is generating a new form. I tried re creating the fomr using the ID's i have now (in properties) but still get the same error that i could not generate my form because my id's were null?
I am stuck from here and dont know where to go. Does anyone have a hint of what i can start doing to get myself going?
|
|
|
|
|
You will never be able to reference an object that has not been instantiated. Try using the object after the form has been created.
|
|
|
|
|
I would like to create a .net SOA web service through Visual studio IDE 2005. Is there any sample available on the web.
I don't want SOA concepts. I need practical sample or How to type answer based on PEACE.
Thanks in advance
|
|
|
|
|
Hi,
There is no difference between SOA webservice and normal webservice, Webservice is a specialized implementation of SOA, its is framework that allows you to intercommunicate with the variant objects of different technology or platform.
The procedure to create a webservice is:
1) Open VS 2005 IDE and create a new Project of Webservice type
2) You will gain access to the projectName.asmx file
3) Under that u can add your own custom webmethods like,
[WebMethod]
pubic void GetFirstOutput()
{
// Executable C# or VB.net code
}
4) Build the code.
5) Implement this service from other webapplicaion or Windows application, by adding the webreference from the implementing project, solution explorer->Project->Right click->Add Web reference, provide the URL like http://localhost/Alias Name/ProjectName.asmx (Which you have created)
6) Add the namespace for the webreference made and to the implementation project and access that GetFirstOutput() method
Mohan
|
|
|
|
|
My value is 3.34242424 and i need the output format as 3.34 How should i get it. Please help me I tried various method using Numeric function, But i didnt get the answer
pitchumani
|
|
|
|
|
Try:
String.Format("{0:0.00}", 3.34242424)
|
|
|
|
|
Hi
when i upload less than 10 MB file its working fine.when i try to
upload more than 10 MB file i got a problem..please let me know how to
increase file upload size
Regards
RPL
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
Dear All,
i created a project where i need to revive the session with the server as longa as my page us opened so i was advised to adda dive an refresh it using AJAX to avoid postbacks and get the same effect of extending the lifetime of the session. "I want to use a javascript timer that calls a function that gets something from the server"
The sad thing is that i know nothing about AJAX
so can any1 help me with code snippests to add to my project so that i can complete my task?
or if any1 can give me to some links about how can that be performed
P.S. i'm using Visual Studio .net 2003 and VB script as a language
Thanx in advance
Best Regards
3ala2
|
|
|
|
|
Check Ajax.NET. It will make it simple, thought javascript driven.
|
|
|
|
|
I checked Ajax.Net
Nothing to do with AJAX!!!
It's a website for selling products
So, any1 else to help?
Best Regards
3ala2
|
|
|
|
|
Not the website, the open source project.
|
|
|
|
|
give me a specific link plz
Best Regards
3ala2
|
|
|
|
|
|
I create some pdf files (using crystal report exporting pdf format) in some deferent pages of my site (which user can download them) and in another page of site, i should merge these various pdf file into one report (concat them) in one pdf format file (user can also download pdf file).
How can i merge these pdf files by crystal report?
I develop using visual studio 2003 and my language is c#.net.
thanks
rastgar
|
|
|
|
|
One would think you would have tried other avenues after a week, and have found an answer. Also let me mention that Subjects like this one rarely get answered.
You may want to try merging the reports themselves and then exporting to PDF, instead of the other way around.
|
|
|
|
|
No Just not intrested
|
|
|
|
|
'Getting a file path
If Not FILE1.PostedFile.FileName = "" Then
FilePath = FILE1.PostedFile.FileName
End If
'Excel Work Sheet Database Connection
MyConnection = New System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=" & FilePath & "; " & _
"Extended Properties=Excel 8.0;")
'Select the data from Sheet1 of the workbook.
'FilePath comes as c:\export\mydata.xls
'now i am going to retrive the "mydata" name only
because of while iam storing the excel file,it is being stored as mydata.xls and at the same time sheet name also being changed as mydata
whenever i am going to retrieve the data, i have to specify the sheet name
for that i am doing the below code, but i am getting an error, it is alreday open by another user or some other error is displayed
Dim f As Array
f = Split(FilePath, "\")
Dim k As Integer = f.Length
Dim str As String = f(k - 1)
Dim filename As String = str.Substring(0, str.LastIndexOf("."))
'' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [" & filename & "$]", MyConnection)
DS = New System.Data.DataSet 'DataSet
MyCommand.Fill(DS) 'Filling The dataset
please help me, when iam going to export the data from database to excel, it is storing it as c1.xls(we give) and sheet1 name is also stored as c1.xls
when i am going to retrieve the data from it, it is giving an error(as above said)
please help me
regards
kishore
go2kish@yahoo.com
kishore
|
|
|
|
|
Dear Friends,
I have an asp.net page, which contains a dropdownlist.
I've inserted 30 items in the dropdown list.
When i click the dropdown list, it shows entire(30) items.
But it should display only 10 items and remaining items should be shown when the scroll bar is scrolled.
If anybody knows the answer for my question, please send the answer as soon as possible.
Senthil Kumar Murugan.
-- modified at 3:01 Thursday 19th April, 2007
|
|
|
|
|
Hi,
I bild an asp.net 2.0 web application, on my develop pc it work right..., I only set the right parser for the application on IIS console... on my home pc it don't work... it' s bad!
the exception text is:
Server Error in '/WSConcessionaria' Application.
--------------------------------------------------------------------------------
Failed to map the path '/WSConcessionaria/App_GlobalResources/'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Failed to map the path '/WSConcessionaria/App_GlobalResources/'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Failed to map the path '/WSConcessionaria/App_GlobalResources/'.]
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +3521404
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(StandardDiskBuildResultCache diskCache) +306
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(StandardDiskBuildResultCache diskCache) +46
System.Web.Compilation.BuildManager.PrecompiledAppRuntimeModeInitialize() +708
System.Web.Compilation.BuildManager.Initialize() +3466117
System.Web.Compilation.BuildManager.InitializeBuildManager() +228
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +310
[HttpException (0x80004005): Failed to map the path '/WSConcessionaria/App_GlobalResources/'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3426887
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +149
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|
|
|
|