|
thns very much for the solution...
|
|
|
|
|
|
Hi,
I have a function (Server Side) which is used to fill the values in dropdownlist but I want to call the function from javascript.I am using c#.net.
Regards,
Atul Rane
|
|
|
|
|
I just checked, and you have posted in the ASP.NET forum before, so you must know it exists.
You're describing AJAX. AJAX is a way for a web page to call the code behind and retrieve data from it without refreshing the entire page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks Christian for your reply,
Can you give me some web links where i can get more detail about this.
Regards,
Atul Rane
|
|
|
|
|
i am a begginer. so thanks if u answer my question in a simple way. i had a form and i wanna add an inherited form by write code. i dont know how?! and i dont know where the code should sit and placed!
[]D @ []v[] []D @ []v[]
|
|
|
|
|
If you want to inherit a form from another form you do something like this (creates a new MyForm class inherited from System.Windows.Forms.Form):
public class MyForm : System.Windows.Forms.Form {
public MyForm() : base() { }
...
}
This seems like a good tutorial to start with: .NET Tutorial for Beginners[^]
|
|
|
|
|
thanks mika, but i like to deal with someone like u to learn it better, if it's no problem.
[]D @ []v[] []D @ []v[]
|
|
|
|
|
These forums are to help people who for example get stuck with a specific problem. All people expect that the person who asks a question has the basic knowledge about the environment he/she is working with. Many times people are given links to shortcuts or books that are very useful, but after that it's expected that the person reads the given information and tries to learn the environment (C# in this case).
So in short the purpose of these forums is not to educate people starting from beginning, but to help people with specific, clearly asked questions.
I'm sure that if you read the document I posted, you'll get a good start to C# inheritance along with other fields of programming in C#. Also you should consider buying a good book or two. Think of it like an investment to yourself.
|
|
|
|
|
Thanks for ur advice. Certainly.
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Nice Advice.....
i will follow this....
|
|
|
|
|
Buy a book on C# and read it. However, what do you mean by 'add an inherited form by write code' ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i mean create an inherited form in code with visual c# ....! i hope u understand what i say!
[]D @ []v[] []D @ []v[]
|
|
|
|
|
Hi all,
This is the code, where the problem occurs.
SqlDataAdapter da = new SqlDataAdapter("UPDATE CompanyInfo SET CompName='abc' where CompID='" + CompID.Text.Trim() + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
int gh = da.Update(ds, "CompanyInfo");
da.Update(ds, "CompanyInfo")- fires an exception ("Update unable to find TableMapping['CompanyInfo'] or DataTable 'CompanyInfo'.").
Please suggest the idea.
Thanks and Regards
modified on Saturday, January 31, 2009 3:23 AM
|
|
|
|
|
The first thing is that the constructor of SqlDataAdapter expects to receive a SELECT string, not an UPDATE string. Also when using SqlDataAdapter you don't concatenate values to the statement (actually you should never do this.
It seems that you've mixed SqlDataAdapter with SqlCommand. So:
- create a proper select sattement
- use that when constructing
- if you want that the update statement is generated automatically, make sure that the select command contains key column from your table. Also use SqlCommandBuilder to create the select command
- otherwise create a SqlCommand for UPDATE and place that in SqlDataAdapter.UpdateCommand
After those steps you can try to call the Update method of the SqlDataAdapter.
|
|
|
|
|
Your code is such that I could erase your database any time i wanted. Please tell me this is a student assignment and not paid work.
Your code is stupid. You fill a dataset and then pass it through the data adapter - why ? You just want to run this SQL, you need no dataset for that. Are you making it up as you go along, or do you actually know somethign about C# or programming in general ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
when i try to write the events with the help of enterprise logging i am seeing them in Event viewer under Application. Is it possible to write events using enterprise logging in custom event logs (i.e other than Application any custom name like my project name). Please help me on this problem.
Md.Karimulla
|
|
|
|
|
|
Hi,
I am using datagridview for displaying the records from the database. Now I am fetching the records with the help of condition.
e.g. There are 1,2,3 records in my db.
if first condition satisfied I am calling display function where I passed the ID and with the help of that ID I am displaying the records.
Now the Problem is I want to update the datagridview so that all the records will display with the satisfied condition. Right Now I am getting the last satisfied record.
Thanks
|
|
|
|
|
just clear the datagridview before calling another condition
|
|
|
|
|
using System;
public class TokenizeDemo
{
public static void Main()
{
int tokenIndex = 0;
string values = "#55;xx sterrr,yy city,india";
string[] sites = values.Split(',', '#', ';', ' ', '/', '\0', '&', '-');
foreach (string a in sites)
{
// Console.WriteLine(a);
Console.WriteLine("token number is\t{0} token'd string is\t{1}\tlength of the string is {2}", tokenIndex++, a, a.Length);
}
}
}
output shows first token is null... how to rectify it... only strings should be tokenized..pls help friends
the quieter u become more u hear
|
|
|
|
|
lawrenceinba wrote: "#55;xx
The first token is null because of the # as the first character.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Did you try reading the documentation ?
StringSplitOptions.RemoveEmptyEntries is what you need, it's a parameter on some overloads.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
then how can i bring 55 as token 0 and so on
the quieter u become more u hear
|
|
|
|