|
Hi
Thanks for replying.
ids in table1 are seperated with commas so t1.id=t2.id will not work.
I need asp.net code to display table1 values as I explained in my previous post.
Thanks
|
|
|
|
|
Seems to me like you need to design your db better in future ( a joining table would have made this doable in the SQL ).
You can read your array of state names and Ids, then write a data binding statement that passes the id string to the code behind, where you use the split method and a string builder to build a string that contains the state abbreviations.
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 Christian
Thanks for reply
Actually I am displaying names of states in a checkbox list and after submitting the form, storing selected checkbox stateids in database with stateids seperated by comma as in table1.
If you have any working example or else any suggestion, please send it.
Thanks
|
|
|
|
|
What I said. A joining table joins data where there's an arbitrary number of joins
id name state id
1 aaa 1,2
2 bbb 1,3
table2:
id state
1 ak
2 ny
3 jk
table3:
nameId, stateId
1, 1
1, 2
2, 1
2, 3
then table 1 loses the stateID column.
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 have a to add a reference dll to my asp.net web application. i'm going to solution explorer and clicking on add reference and selecting a dll for reference. but i'm not getting references folder in the solution explorer. can any body tell what is the problem and how can i add a dll as reference.
thanks for your help
M.MohanVamsi
|
|
|
|
|
I believe you just add it to your bin folder and then refer to it from there.
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,
please i need a button to work on more than one validation group.
Mohammad Al Hoss
|
|
|
|
|
OK - I don't know if you can specify more than one group, if not, you have to dig into the javascript that the framwork generates and write your own code to call the different groups.
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 )
|
|
|
|
|
How will the button know what group to validate??
Whats your scenario??
Maybe there could be another way
Alexei Rodriguez
|
|
|
|
|
hi,
I think this link will explain exactly what i want
http://www.peterblum.com/DES/DemoGroup.aspx?B=1
Thanks
Mohammad Al Hoss
|
|
|
|
|
Hello,
I have a db that stores phone numbers in the following format: (###) ###-####. I would like to reformat the phone number to the this format (for mobile apps to pick up the number for dialing): ###-###-####. I have used the following line of code to attempt this reformatting but am still getting the phone number displayed in its original format.
<itemtemplate>
<asp:label runat="server" id="lblContact" text="">]]>'/>
Can anyone help me with this? Thanks in advance to all those that reply.
|
|
|
|
|
you can write it in your sql statement I think:
SELECT field,field2, FORMAT (Telephone,' (###)-##-#######' ) AS NewPhone FROM table
|
|
|
|
|
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 ?
|
|
|
|
|