|
All of my code lines are getting debug successfully without any error.
But error has been shown at my page by debugging all of my lines. Thanks in adv.Balasubramanian K.
modified on Wednesday, February 17, 2010 7:29 AM
|
|
|
|
|
BalasubramanianK wrote: All of my code lines are getting debug successfully without any error.
But error has been shown at my page by debugging all of my lines. Thanks in adv.
Which of these two statements is true?txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hi guys,
I am having a few problems reading a line from an XML file on the web somewhere - say http://www.blah.com/myfile.xml - from within a c# application.
I do not even know roughly where to begin in order to read the XML file?
Do I need to download it to my desktop first, and then open it - because of security issues?
A poke in the right direction (or correct functions / concepts to use) would be greatly appreciated!!
Thanks!
Alex
|
|
|
|
|
|
Thank you very much for your help indeed!!
|
|
|
|
|
hello seniors,
i have to pass memcod with query string on link button's click and also have to open a popup on which i'll upload picture.
i want to open that popup using window.open() javascript method
please help me its very urgent.....
Mayank Pathak
|
|
|
|
|
This is better suited in the ASP.NET forum.
|
|
|
|
|
Additionally, change your user name: never post email addresses in forums unless you really like spam! You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
|
|
|
|
|
Well Thnx for the suggestions,
Actually i'm new to .net and on codeproject community
|
|
|
|
|
Mayank Pathak, Chandigarh wrote: Actually i'm new to .net and on codeproject community
Yes, I think we guessed...
There is a list of forums on the left, try to post your query in the most appropriate, or use the "Quick Answers" near the top right. Otherwise people will get upset with you! You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
|
|
|
|
|
Hi All,
I was wondering to create the above three controls at a time.My Grid is attached with a Table from a database.
Every time an Entry is made on the table I want the Gridview and a textbox and a Button to be created.
For any entry on the table i would like a gridview which contains a databound textbox ,Text box which is not dataBound and a button control.
If for instance i have three records on a Table then we have a gridview which is got three textbox to reflect data and also other three blank textbox and three Buttons side by side.
Thanks for your time.
Many thanksmodified on Wednesday, February 17, 2010 6:26 AM
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:46am.
|
|
|
|
|
Thanks so much its Much appreciated.The textbox and Button are not databind only the one in Gridview has a data from the table.It will be great if you can show me an example.
Many thanks
|
|
|
|
|
Are you there?
How Can I create textBox and a Button which is not Databind in a GridView?
Regards
|
|
|
|
|
Hi There,
Thanks for your answer.Your answer doesnt make sense.So could you please dont reply if you cant explain what you mean.
It will Block others from Posting their view.
Many thanks
|
|
|
|
|
Hi,
I am having below regular expression
/[^/]+/(?<Name1>[^/]+)/[^/]+/(?<Name2>.+)
which will accept strings of below format
/VB/XYZ/8/5/10103303.abc
I want to extend my regular expression which will accept extra feild like " ?key=name3
so my input string will
/VB/XYZ/8/5/10103303.abc?key=<name3>
Please suggest
Thanks,
|
|
|
|
|
Just tag it on the end:
/[^/]+/(?<Name1>[^/]+)/[^/]+/(?<Name2>.+)\?(?<Key>.*)=(?<Token>.*)
I strongly suggest you get a copy of Expresso [^]- it creates, explains, and tests regular expressions.
[edit]replaced < and > with safe versions.[/edit]You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
modified on Wednesday, February 17, 2010 5:26 AM
|
|
|
|
|
Hi,
Thank you for your reply can you please make it more clear by providing full regular expression and this is a url string which is having querystring "key=" at the ending and I am reading this value using
m.Groups["name3"] in my C# application.
Thanks,
|
|
|
|
|
Sorry about that - I have modified the original post. For some reason, the "encode "<" and other HTML characters" option is not working...
/[^/]+/(?<Name1>[^/]+)/[^/]+/(?<Name2>.+)\?(?<Key>.*)=(?<Token>.*)You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
|
|
|
|
|
|
Hi folks!
The XmlSerializer is giving me a headache. I've got this class (.NET 2.0):
[Serializable]
public class ParticipantList : List<Participant>
{
private Guid _ID = Guid.NewGuid();
public Guid ID
{
get { return _ID; }
set { _ID = value; }
}
public static void ToFile(ParticipantList list, string filename)
{
using (FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write))
{
XmlSerializer xs = new XmlSerializer(typeof(ParticipantList));
xs.Serialize(fs, list);
}
}
public static ParticipantList FromFile(string filename)
{
using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
XmlSerializer xs = new XmlSerializer(typeof(ParticipantList));
return (ParticipantList)xs.Deserialize(fs);
}
}
}
Pretty basic stuff it would seem.
The participant list gets serialized OK, but the ID isn't included in the XML file!
Did I miss something? Has the XmlSerializer gone nuts?
Thanks in advance for tips on how to get the ID serialized as well!
[Update]
No additional property or member gets serialized, the Guid isn't the reason.Regards,
mav
--
Black holes are the places where God divided by 0...
modified on Wednesday, February 17, 2010 6:16 AM
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:46am.
|
|
|
|
|
Hi!
Thanks for your reply.
Meanwhile I've found that the problem doesn't stem from the property being a Guid but from deriving from List<T>.
No matter which additional properties I define, none of them gets serialized!Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Ok, I've found a solution myself:
According to this thread[^] the behaviour is "by design" and unsually no attributes of such a class are serialized.
I've solved the problem by not deriving from List<T> but by including the list as a member.
Thanks anyway,Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi,
i'm very new about c# but, I need to change a little program using VC#2005 + MySQL.
The following code works well. My problem is insert a second query to make an INSERT into the DB.
void Cmd_Login_Click(object sender, EventArgs e)
{
string host = "localhost";
string database = "database";
string user = "username";
string password = "password";
string strSQL = "SELECT * FROM users";
string strProvider = "Data Source=" + host +
";Database=" + database +
";User ID=" + user +
";Password=" + password;
try
{
MySqlConnection mysqlCon = new MySqlConnection(strProvider);
mysqlCon.Open();
if (mysqlCon.State.ToString() == "Open")
{
MySqlCommand mysqlCmd = new MySqlCommand(strSQL, mysqlCon);
MySqlDataReader mysqlReader = mysqlCmd.ExecuteReader();
while (mysqlReader.Read())
{
if (Txt_Name.Text == mysqlReader.GetString(1) && Txt_Code.Text == mysqlReader.GetString(2))
{
<big></big>
if (checkBox1.Checked )
{
Frm_Main Frm_Main = new Frm_Main();
Frm_Main.Close();
Form1 form1 = new Form1();
form1.ShowDialog();
}
else
{
Pan_Step1.Visible = false;
Closer.Start();
}
}
}
}
else
{
System.Media.SystemSounds.Hand.Play();
}
mysqlCon.Close();
}
catch (Exception er)
{
Console.WriteLine("Errore " + er.Message);
}
}
The query to insert into the code is like this:
strSQL = "UPDATE users SET access='" + DateTime.Now.ToString() + "', admin='" + checkBox1.CheckState + "' WHERE username='" + mysqlReader.GetString(1) + "'";
MySqlConnection mysqlCon = new MySqlConnection(strProvider);
mysqlCon.Open();
MySqlCommand mysqlCon = new MySqlCommand(strSQL);
mysqlCon.ExecuteNonQuery();
This code mean that if I write the right access account the query update the DB information about the last access.
Obviously I receive back a lot of errors.
Someone can help me to write the right code so I understand the mistake?
|
|
|
|