|
Hello .netman,
I tried what you suggested and received the following error: 'Format' is not a recognized function name. I think this function is only applicable to MS Access and not SqlServer. However, I was able to do this through using the Substring function and extracting smaller strings of the phone number and concatenating them back together. Thanks for leading down the right road.
|
|
|
|
|
You can use a regular expression to reformat the string:
VB:
<![CDATA[<%# System.Text.RegularExpressions.Regex.Replace(Eval("Work_Phone"), "\((\d+)\) (\d+)-(\d+)", "$1-$2-$3") %>]]>
C#:
<![CDATA[<%# System.Text.RegularExpressions.Regex.Replace(Eval("Work_Phone"), @"\((\d+)\) (\d+)-(\d+)", "$1-$2-$3") %>]]>
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello,
I have a table of orders for customised bags, the table contains the information that will be printed on the bag and the quantity of bags required, from this I need to create a new table which contains the information for each bag, but x the quantity. so if there is a row which has the bag information and the quantity is 10, then I need to insert 10 identically rows, one for each bag required. And I need to do this for every record in the first table.
Please Help
Joe
P.s. i forgot to mention i'm using C# in asp.net and an sql database.
|
|
|
|
|
then you need a loop to count the number of rows in quantity and for each row put the insert statement
|
|
|
|
|
ah yes, i didn't think of that, thankyou
|
|
|
|
|
Hi All,
I using ASP.NET 2008 (C#). Also I have created a Employee Class named .cs but I am not able to create object of Employee class in Code Behind of Employee.asp.cs.
I am getting Error as "The type or namespace name 'CEmployee' could not be found (are you missing a using directive or an assembly reference?)"
Is it the problem of web config file???
Please help...
Thanks in advance...
|
|
|
|
|
ASP.NET 2.0 wrote: "The type or namespace name 'CEmployee' could not be found (are you missing a using directive or an assembly reference?)"
Your class is in app_code right ? Make sure it is in same namespace too.
|
|
|
|
|
Thanks for the reply. My Class is in app_code folder and in the same namespace.
But its not working...
Please help me...
|
|
|
|
|
Don't know - Your class don't have any access modifiers, right ? Have you tried creating another sample class and try to refer it.
|
|
|
|
|
Development environment : ASP.NET 2.0 , Visual studio 2005
I am looking for a good method for deploying my ASP.NET application. I have used "Publish website" feature with "Allow site to updatable" checkbox checked. This worked correctly, but I am facing some problem in updating the site after deploying. I did the change in local machine and used the "Publish website" again, but it changed all assemblies names (assemblies which starts with app_web ).
There is another option to avoid this by checking "Use fixed assembly names" checkbox. But it will generate each assembly for each page, so I will have many DLLs in my bin directory. Is there any performance impact for this method ? Or do I need to use aspnet_merge.exe and merge assemblies ? I need to update this site regularly. Please suggest a good method.
Thanks
|
|
|
|
|
You may use merge.exe as well however looking at performance, you should use "Use fixed assembly names" option.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Thank you for the reply. Do you have any articles which talks about the performance issue for fixed naming ?
|
|
|
|
|
|
Hi there,
I've created a web page and it contains three images. These all images will be changable. So i want to give the path of images in Web.Config file and file name in that particular image src. How i can give that?. Also am using code behind not inline.
I wanted to write only in aspx page not in codebehind.
Below is my code:
Web.Config:
<add key="ImagePath" value="http://192.168.0.181/Labeling/Images/"/>
and in my aspx page,
<img id="ImgHeader" runat="server" src="<%header.gif%>" />
What all the ways available to call WebConfig file values?
Please help..!!
Regards n Thks
Sam.M
|
|
|
|
|
<img id="ImgHeader" runat="server" src='<% ConfigurationManager.AppSettings["ImgHeader"] %>' /> ?
|
|
|
|
|
Sorry. This is not working. It's not retrieving the value from web.Config file. When i right click the image and see the properties it says "Not Available"
I want to write the path only in aspx page and all other code i've written in code behind.
Do i need to register any namespace?
Regards n Thks
Sam.M
|
|
|
|
|
Then try
<img id="ImgHeader" src='<%= ConfigurationManager.AppSettings["ImagePath"] %>' />
|
|
|
|
|
I tried,but below error is coming:
Compiler Error Message: CS1002: ; expected
Regards n Thks
Sam.M
|
|
|
|
|
Yes you need to put ; at the end of statement.
<img id="ImgHeader" src='<%= ConfigurationManager.AppSettings["ImagePath"]; %>' />
|
|
|
|
|
Thanks. It's working fine.
Regards n Thks
Sam.M
|
|
|
|
|
string strConfig= System.Configuration.ConfigurationSettings.AppSettings[strKey];
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
modified on Tuesday, May 6, 2008 9:13 AM
|
|
|
|
|
Abhijit Jana wrote: string strConfig= System.Configuration.ConfigurationSettings.AppSettings[strKey];
strFilePath = HttpContext.Current.Server.MapPath(strConfig);
now read it as XML file
What do you mean ? What is the point in reading as XML file for setting a image URL ?
|
|
|
|
|
This is not working.
I want to write the path only in aspx page and all other code i've written in code behind.
Do i need to register any namespace?
Regards n Thks
Sam.M
|
|
|
|
|
If your images are all going to be assigned via code behind and you have access to the control:
imgHeader.ImageUrl = ConfigurationManager.AppSettings["ImgHeader"] + "image.jpg";
or, if your going to use a mixture of code behind and UI,
]]>' />
I think you might be duplicating your assignment of the src value, thus overwritting what is initially set loosing the path.
|
|
|
|
|
Hi,
I am showing image dynamacally.I got image path from database.
After I changed the image in that path with same name but its showing old one.once i click refresh button of browser its showing updated image.
(I think first time browser getting the image from temporary internet file).Do u have any Idea ?
Thank & Regards
Vijay s
|
|
|
|