|
This is obviously not the actual error message.
Try reading here[^], focusing on the section on error messages.
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 are you testing it, are you consuming it in code or just firing it up from internet explorer and boshing numbers in?
Regards,
Rob Philpott.
|
|
|
|
|
You actually have to write some code to exercise the methods. The ASMX test page only works in localhost - this is a security measure so that people can't actually screw up your environment.
|
|
|
|
|
hi,
i have put a div tag in Datalist. I want to access this div tag to modify its style when a (linkbutton) control in datalist is clicked.
I have added the javascript onclick attributes to linkbutton control at itemdatabound of datalist, but when the js function is called the document.getelementbyid("divName") returns the empty string.
i guess the problem is because the divName is getting repeated within the datalist.....
Please help.. let me know if more information is reqd.
Thanks,
aditya
adi_nik
|
|
|
|
|
Are you sure the right div name is being written into your page ? Yeah, I suspect you need to create unique names and pass them through on the function you call.
You should have asked this in the ASP.NEt forum
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 )
|
|
|
|
|
the code looks like this..
........ ....
Probably this divId is same for all the items created in the datalist.
Can you please help to automatically generate unique names?
adi_nik
|
|
|
|
|
aditya13 wrote: the code looks like this..
.....
...
....
excuse me ?
One obvious way to make the div Ids unique is to append the row number or some other unique Id from your data source to the div name.
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 )
|
|
|
|
|
i am sorry but the site filtered the code i had put.......
now i found that the divid.style.top returns empty string unless some top attribute is specified before calling this as shown in the following code snippet.
I am simply keeping the div tags and i dont know what would be its top postion... however based on its top value i want to set some other div element's value.
My question now asks how to find the top position of a div in a page?
<script type="text/javascript" language="javascript"><br />
function executeJS()<br />
{<br />
<br />
alert("child: " + (document.getElementById("divid")).style.top + " parent: " +(document.getElementById("parent")).style.top );<br />
}<br />
</script><br />
<br />
<div id="parent" style="position: fixed; top:220px "><br />
<div id="divid" runat="server" visible="true" style="position: absolute; top: 30px;"><br />
hello</div><br />
<a onclick="executeJS()">click here</a></div>
adi_nik
|
|
|
|
|
hai, how do execute the textbox script value at dynamically in .net with c#.if you know the answer replay to me..
|
|
|
|
|
It's possible to dynamically compile and run code, surely there are examples of this on the web ?
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 )
|
|
|
|
|
i search so many website. but i donot get any answer.if you know the website path send to me....thank you..
|
|
|
|
|
Please read the article I link to in my sig. As an example, I found there is heaps of info on google[^], if you read my article, perhaps you'll get a better idea on how to use it ?
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 can i convert color form a hex format to a byte format? in other words how to convert from hex to argb
thx
|
|
|
|
|
You mean if you have 0xFFFFFF, how to turn that into argb ? Something like this
int color = 0xFFFFFF;
byte alpha = (byte)((color && 0xFF000000) << 24);
byte red = (byte)((color && 0xFF0000) << 16);
byte green = (byte)((color && 0xFF00) << 8);
byte blue = (byte)((color && 0xFF)));
Something like that. Use the && to strip the other bits, and a bit shift to move it down to be just a byte.
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 )
|
|
|
|
|
so how can i get a value from a textbox and then convert it
|
|
|
|
|
Get the .Text string and then apply Christian's code to it.
|
|
|
|
|
Please, please, please buy a beginners book and read it.
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 )
|
|
|
|
|
well here is the way i got it to work
<br />
int Color; <br />
Color = int.Parse(TextBox1.Text, NumberStyles.HexNumber); <br />
|
|
|
|
|
OK, what this does is not what you asked for. This gives you a a single number, no color information at all.
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 have it as a string use ColorTranslator.FromHtml.
|
|
|
|
|
I have a DataGridView (called dgStandings) that has a datasource of a datatable (called dtLeader). I want to fire an event when someone double clicks a cell in the datagrid view and have a new window load with data depending on what cell is clicked. Unfortunately, none of the events I make (CellMouseDoubleClick,CellContentDoubleClick,CellMouseUp) ever fire an event. In fact, the events above only fire when I click/doubleclick on one of the header cells in dgStandings.
So how can I fire an event when I doubleclick a cell in dgStandings?
|
|
|
|
|
Please post code containing the declaration of the DataGridView, the loading of its data, and the methods you've created to handle the event(s). That should help get a clearer picture of what might be hanging you up.
|
|
|
|
|
hook to the DataGridView's CellDoubleClick event
if selecting by row do a
foreach (DataGridViewRow row in this.dgStandings.SelectedRows)<br />
{<br />
goGetYourNewDataMethodWhichTakesAString(row.Cells[0].Value.ToString());<br />
}
where the cell index is the cell you want
or for multiple cells
foreach (DataGridViewCell cell in this.dgStandings.SelectedCells)<br />
{<br />
goGetYourNewDataMethodWhichTakesAStringcell.Value.ToString();<br />
}
or even more simply
goGetYourNewDataMethodWhichTakesAString(this.dgStandings.SelectedCells[0].Value.ToString());
|
|
|
|
|
Hi,
I have a user control that has a textbox.
This user control is placed in a form at runtime. This form gives a string to the user control and the textbox is to show this in multiple lines.(i do so using a property to set the textbox's text property)
So in designer view i set the multiline property to TRUE and
the word wrap property to TRUE.
This enables the text to be shown in multiple lines at runtime.
But the textbox size does not grow according to the number of lines of text that it contains.
I dont want to use scrolls.
Please suggest how to set the size of the textbox to adjust according to the number of lines it has at runtime. So that all lines are shown. and i can accordingly place other contols below it.
Thanks
|
|
|
|
|
Write your own class derived from the textbox. When the user hits enter, measure the string, if it doesn't fit, make the textbox get bigger.
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 )
|
|
|
|