|
Hi,
Thanks a lot!!! It's working.
Thanks once again,
Suresh kumar palleti,
India.
|
|
|
|
|
I'm try to writing a program use to allow The Phone like a game-handle.
How can I connect PC and WindowsMobile Phone use bluetooth?
Thanks!
|
|
|
|
|
|
Hi
Can anyone please tell me how to restrict the browser to a sigle tab,and prevent the user from opening any new tabs in the same browser.
Is it possible to achieve this from javascript or on the server side ?
Thanks in advance
|
|
|
|
|
Nope. It's not possible to restrict IE7 to a single tab from code running in the browser and definitly not possible to do it from the server side. It IS a setting available to the user of IE7, but changing that setting requires IE7 to be restarted in order for it to take effect.
|
|
|
|
|
Hi Dave,
Thanks for your response i got the point.
My problem is that when the application is opened in multiple tabs in the same browser
it is using the same session id.
Making the session cookieless using the sessionstate attribute in web.config does solve my problem
but the following link
http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx[^]
says that it is not advisable for ajax enabled applications
what maybe the reason for that or do i have any other work arounds to avoid the browser using the
same sessionid across multiple tabs.
Thanks,
R.Sundar.
|
|
|
|
|
I have no idea since my experience with AJAX is really limited. You should be asking this in the ASP.NET forum, not C#.
|
|
|
|
|
hello,
I have a datatable with 4 columns
now i have some value in cell of 4th column
and on selectedIndexchange event of Combobox i want to update its value.
i m looping below listed code:
<code>MarkupList.Rows[i].ItemArray.SetValue("For Information Only", 4);</code>
but it does'nt seem to work as it is not changing value.
please help to solve the problem.
sejal
|
|
|
|
|
Hi Sejal,
Can you please post your code here ,so one can provide the solution ?
Regards
|
|
|
|
|
for (int i = 0; MarkupList.Rows.Count; i++)
{
if (MarkupList.Rows[i].ItemArray.GetValue(4) == "No")
{
MarkupList.Rows[i].ItemArray.SetValue("ENG_NO", 4);
}
else if (MarkupList.Rows[i].ItemArray.GetValue(4) == "None")
{
MarkupList.Rows[i].ItemArray.SetValue("Eng_NONE", 4);
}
else if (MarkupList.Rows[i].ItemArray.GetValue(4) == "Yes")
{
MarkupList.Rows[i].ItemArray.SetValue("ENG_YES", 4);
}
}
May be this is not correct. But i wanted to know the method to update datatable field values.
sejal
|
|
|
|
|
How do i declare array inside a struct.Cause i got error, and it said should use new keyword to declare. For example:
public struct MY_TRUCT
{
public int Number;
public string Description;
public string ParaTypes[20];
}
|
|
|
|
|
may be like this
public struct MY_TRUCT
{
public int Number;
public string Description;
public string[] ParaTypes = new string[20];
}
rahul
|
|
|
|
|
No, that doesn't work. You can't initialize the members of a struct.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You can't create an array in the declaration of a struct.
Do you have any reason to make it a struct? Otherwise you should make it a class. Implementing a struct correctly is more complicated than implementing a class correctly.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
As it was said, you cannot initialize struct member, neither can you use parameterless constructor,
but you can use a constructor with parameters and initialize you array there.
Something like this:
public struct MY_TRUCT
{
public int Number;
public string Description;
public string ParaTypes[];
public MY_TRUCT(string[] paraTypes) {
ParaTypes = paraTypes;
}
}
Regards,
Lev
modified on Tuesday, December 30, 2008 1:06 AM
|
|
|
|
|
With some corrections, that would work, but it still isn't a good implementation of a struct.
Consider this:
MY_TRUCT x = new MY_TRUCT(new string[] { "a", "b" } );
Console.WriteLine(x.ParaTypes[0]);
MY_TRUCT y = x;
y.ParaTypes[0] = "c";
Console.WriteLine(x.ParaTypes[0]);
Mutable structs can give you surprising results, structs containing mutable objects can give you even more surprising results...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: With some corrections, that would work, but it still isn't a good implementation of a struct.
Nobody says it is
I just wanted to make a point that he can initialize a struct member with a constructor with parameters, if a non-default value is needed.
Regards,
Lev
|
|
|
|
|
public string ParaTypes[20]
i got error: array size can not be specified in a variable declaration?
|
|
|
|
|
Oops, of course you can't, the array has to be specified during the initialization
Fixed the post, sorry for that (didn't have a compiler at the moment )
Regards,
Lev
|
|
|
|
|
Hi all,
I have an XML as following. I'm trying to read it with the following code:
DataSet cars = new DataSet();
cars.ReadXml("http://localhost/cars/newcars.xml");
All the nodes are getting properly populated into the Dataset created EXCEPT the "description" node. I can't find a way to make ReadXML (or similar method) to get the content of the description node and skip the HTML tags. I would like just treat that portion as pure text, ignoring the html content.
My question would be: How can I read an XML file which some of the nodes have HTML tags inserted? How could I avoid that the program treats the HTML tags as XML nodes>
thanks,
Juan
<cars>
<car>
<color>red</color>
<model>ford</model>
<description>
<p xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Super</br>fast</br></span></p><h2 xmlns="http://www.w3.org/1999/xhtml"><span class="textnorm" title="">Reasons to buy</span></h2><p xmlns="http://www.w3.org/1999/xhtml">Just because</p>
</description>
</car>
</cars>
|
|
|
|
|
HTML content should be placed inside a CDATA section. So XML parsers will ignore it.
|
|
|
|
|
thanks! I'll work on that solution.
-- Juan
|
|
|
|
|
Hai all,
In my datagridview i have multple cells.i need values in all cell in each roe.
Suppose my dgridvw contains name and order as two fields.
my requirement is for each row i need value of cells separately
ie
i used a generic list
list<demo> myDemo=new list<demo>();
demo dm=new demo();//demo is class
for(i=0;i<tabCount;i++)
{
foreach(datagridviewrow row in dgv.rows)
{
dm.text=row.cells[0].value.tostring();
dm.order=row.cells[1].value.tostring();
}
myDemo.add(dm);
}
in first row i entered text=myText and order=1
in second row i entered text=urText and order=2
but atlast i am getting later values for each row.
ie urText and 2 in both row.
i need different values for different row
pls help me
|
|
|
|
|
i think putting myDemo.add(dm);
inside
foreach(datagridviewrow row in dgv.rows)
{
dm.text=row.cells[0].value.tostring();
dm.order=row.cells[1].value.tostring();
myDemo.add(dm);
}
may solve ur problem
rahul
|
|
|
|