|
.netman wrote: how would I compare a value to all the values in the label,
If you follow this approach it would be difficult to check the value existence. Use a generic List<string> instead. It has a Contains() method which tells the items is already in the list. So inside the loop instead of appending to label's text, you have to add items to this list instance. Once you finish the loop, iterate through the list items and append the text to label.
Hope this helps
|
|
|
|
|
Hi,
I am using Datalist. I am binding Check box for every product and also ID value of that product.That is If there are 3-4 products then each one have one check box. Also ID is attached to Text Property of ChechBox. Now I dont want to show ID that is assign to check box but I want that ID.
Because If 2nd Product Selected then I want ID of that product.
How can I get the ID of that Product?
Thanks
|
|
|
|
|
Store it as an attribute of the checkbox and access 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 All;
Is there is a way to Make Alignment for all data in gridview controle
i want all data to be in center alignment
thnx for your effort and your advice
Kareem Elhosseny
|
|
|
|
|
Just write your templates so each cell contains a div that centers the data.
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 )
|
|
|
|
|
Sorry Christian It's not clear for me please can you explain it more
Kareem Elhosseny
|
|
|
|
|
for each cell have some html code i.e. a div which has an alignment value in i.e. center
|
|
|
|
|
Sounds like you're using ASP.NET but don't know any HTML, I recommend buying a book on HTML, because that is ultimately what you're trying to create here.
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 )
|
|
|
|
|
If you use the Columns-section of your Gridview you can add ItemStyle- HorizontalAlign and set it to Center.
|
|
|
|
|
thnx alot it works
Kareem Elhosseny
|
|
|
|
|
Hi,
I am using Asp.net 1.1 , I am fetching some data for oracle database and i am displaying this data in Datagrid
I am getting the following exception :
Exception of type System.OutOfMemoryException was thrown.
My query is returning 1,20,000 recoreds (when i copied the resultset to notepad it
14 MB)
After searching in internet i updated my web.config as
httpruntime maxrequestlength="1048576" /
But this is also not working.
Please suggest me.
|
|
|
|
|
salmonraju wrote: My query is returning 1,20,000 recoreds (when i copied the resultset to notepad it
14 MB)
I assume this is 1.2 million, does this not seem to you like a bad idea ?
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 )
|
|
|
|
|
During my early prototyping, form and control names change often, and this requires updating all hyperlinks and redirects to these forms and controls. I'm thinking of some way to intercept a name change, and then update a Phrasebook pattern store of physical URL'
s keyed on logical form names. All suggestions will be welcome, and I would be more than glad to share my final solution as an article if it requires enough work.
Pits fall into Chuck Norris.
|
|
|
|
|
Put the links in a config file and access them from there, then you have one place to change them
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 set of values which are displayed from a database table and are as so
1,2,3,4,5,6
They are displayed in that order.
However a user can add a number to these already exisiting numbers i.e. add the number 2.
If a user did that I would like all the numbers to re-order so that it would be
1,2,3,4,5,6,7
not
1,2,2,3,4,5,6
I'm not sure what this would be called or what method to use hence why i havent used google yet but if any1 has done this or something similar or knows a way to do it please let me know so I can then start searching for solutions!!
cheers
|
|
|
|
|
So, if they add two, you turn two into seven ? I would say you need to explain a bit better, or you need to write code that checks if the value exists and if it does, make up one that doesn't, or you need to stop the user from inputting existing values.
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 )
|
|
|
|
|
No sorry
basically if they add a 2 to the following sequence
1,2,3,4,5,6
then every number including the exisiting 2 will increment by 1
basically the numbers are assigned to an item so lets say its like this
1 Itemid 1234
2 Itemid 1667
3 Itemid 1435
4 Itemid 1222
5 Itemid 1696
6 Itemid 1240
i added the following: number 2 Itemid 0987, the list would then become
1 Itemid 1234
2 Itemid 0987
3 Itemid 1667
4 Itemid 1435
5 Itemid 1222
6 Itemid 1696
7 Itemid 1240
I would prefer to keep a sequential order rather then just make one up
does this make more sense?
thanks
|
|
|
|
|
OK, I get it. You're changing the values you have, I can't think of any way to automate that, you'd need to work out where it was being inserted and change yuor values accordingly. I assume they are not primary keys coming from a database, as that would cause issues, obviously.
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 )
|
|
|
|
|
No they are not primary keys
One way would be to add 1 to every number that is in the table after the new number which has been entered, do you think this is feasable?
I would know what the new number entered would be so I could just match that to a number in the database and add 1 to the exisiting numeber and then to every number after that, phew!!
I know that every number in the list would be in order after that so that wouldn't be an issue.
|
|
|
|
|
I Copied the Menu1 Control form 1 form to another form because the other form contains the same coding and also some
additional coding for that form.
But it gives me above error.
|
|
|
|
|
sjs4u wrote: The name 'Menu1' does not exist in the current context
The error message is clear enough. Isn't it ?
|
|
|
|
|
What makes you feel that the control does exist, when the error message tells you it doesn't ? What help do you expect from us when it's clear what the error message means and you've posted no code to try and prove that the error is wrong, or to help us point out why it's right ?
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 )
|
|
|
|
|
Did all the < and > tags came along with the copy?
|
|
|
|
|
Hello,
I have to implement field level security in web application, for that purpose i need the list of controls from ( a specific aspx page selected from ddl present in our application).
Please give me sample code if u have any idea.
Thanks alot
Regards Syed Kamran ul Haq
ALLAH HAFIZ
|
|
|
|
|
You should try searching on google for questions like that before you post here, im sure someone else will say the same
|
|
|
|