|
Mycroft already gave you the solution.
|
|
|
|
|
i found it but it doesn,t work in web application(asp.net) it just works in windows form mode.the code is:
TextBox1.DataBindings.Add("Text",DataTable,"FName");
|
|
|
|
|
Go back to your original question and find the part where you specified you were working in ASP.NET. Oh, that's right, you didn't do that!
There's an ASP.NET forum to ask yor question in.
|
|
|
|
|
|
when i update in parent table i want automatic change in child table.
what will code for this questions
|
|
|
|
|
You might want to expand on this rather vague question; exactly what tables are you referring to?
Use the best guess
|
|
|
|
|
Asp.Net or classic ASP? In any case, you have a better bet of getting good answers in the ASP.Net forum.
|
|
|
|
|
In the c++-cli dll which is referenced in my c# project, I have
namespace MatsWrapper {
public struct MatsContact
{
public:
char* contactName;
char* fileName;
float lat;
float lng;
float heading;
int numContact;
};
In my c# project I'm trying to access the members but they don't show up in the intellisense.
unsafe{
MatsWrapper.Class1 oMats = new
MatsWrapper.Class1();
MatsWrapper.MatsContact** contacts;
contacts = oMats.CallMats(x);
int numContacts = oMats.m_numContacts;
for (int k = 0; k < numContacts; ++k)
{
Contact newCtc;
newCtc = Contact.Create(contacts[k]->contactName, ac.Latitude, ac.Longitude);
}
contactName doesn't show up when I do contacts[k]->contactName.
Why is this and how do I fix it?
Many thanks,
sb
|
|
|
|
|
|
my namespace is noise but my database name noise2 .there are two table . i want to connect with noise2 but get some error like the name"lbltxtname" does not exist in current context. what can do now ??
|
|
|
|
|
mmmickyyy wrote: what can do now ??
Study[^].
You won't get far without some basic knowledge. Copy/pasting code from a forum on each new task you have to do will become frustrating quickly, for both of us.
FWIW; you do not 'connect' a label with a table. A label can be used to display something. You can fetch values from a database using the IDbConnection classes (see System.Data), and one can display that data in a label.
Good luck.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Namespaces are not available because you have in all probability missed out adding the dll references to the project.
Add those and then give it a go.
You can put in smaller subject lines when you post your next question.
|
|
|
|
|
update tblMaxValue set maxValue=maxValue+1 (select maxValue from tblMaxValue)
|
|
|
|
|
It's two SQL queries. The first updates the maxValue record, and then the second one selects this value out of the table. I suspect that you are running this inside a single transaction because this is a common technique when you need to manually generate a key. Effectively, what this does is lock the record on the update so that you can then select the value you just updated, rather than getting a random value out based on the selection of a maximum value in a multi-user system.
Now, some things you need to know about posting here on Code Project.
- You need to pick the right forum to post a question in. This question has nothing to do with C# - it's a database query, so it should be asked in the database forum.
- You need to pick meaningful titles. The title you put down here is worse than useless.
- When you present code, wrap them in pre blocks. Once you've typed your code in, highlight it and then press the code button above the textbox. This allows you to select the language you want to use.
- Don't double post questions.
- Finally, you'll find you get on better if you take the opportunity to say please and thank you.
|
|
|
|
|
This question would have been much more interesting if you were actually asking what "??" is. It would have been in the right forum, too, which this question isn't.
|
|
|
|
|
hi friends,
i wanna do one task in c#,mentioned below are concept of my task
there is one feedback form page , to get the feedback details to my original gmail account while submitting the feedback form.
i was thinked about my task, and got some ideas ,
1. To store the feedback datas in feedback master table by sumbmit the button
2.i suppose use hyperlink instead of gmail, in this clickevent of hyperlink i call bussiness method for accesing that feedabck master table.
3.but how can i implement this in gmail
|
|
|
|
|
Can you elaborate a bit more about what you're trying to acomplish?
- I suppose you're talking about a Website / Webapplication writtin in c# is that correct?
- What exactly do you want to do with that "feedback details"? Send yourself an e-mail? Send someone else an e-mail using your gmail credentials?
- what do you mean by "hyperlink instead of gmail"?
|
|
|
|
|
actually this is my own interest to do this task,am fresher in this asp.net
k let i explain about that task ,
simply i have one webpage as feedback, there is two field
name and feeback message. once the people who submit the feedabck ,then immediately i wanna get the name and feedback messgae in to my gmail account for people who are all submit the feedback .. is this possible?
|
|
|
|
|
As I understand it you want to send the feedback someone enters on your form as an email to your gmail account.
Have a look at the SmtpClient[^] Class and the MailMessage [^] Class from the System.Net.Mail Namespace. Other than the examples on MSDN you should also find plenty of examples by searching for it on google.
|
|
|
|
|
k thanks nic.. i will try it.
|
|
|
|
|
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 18: protected void Page_Load(object sender, EventArgs e)
Line 19: {
Line 20: if (Request.QueryString["studentName"].ToString().Trim() == "") lblStudentName.Text = "No Record Found"; else lblStudentName.Text = Request.QueryString["Name"].ToString().Trim();
Line 21: if (Request.QueryString["studentCode"].ToString().Trim() == "") lblStudentCode.Text = "No Record Found"; else lblStudentCode.Text = Request.QueryString["Code"].ToString().Trim();
Line 22: }
Source File: D:\sanjib\niose\noise\noise\noise\recordSaved.aspx.cs Line: 20
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
noise.recordSaved.Page_Load(Object sender, EventArgs e) in D:\sanjib\niose\noise\noise\noise\recordSaved.aspx.cs:20
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
|
|
|
|
|
have you checked that
Request.QueryString["studentName"]
or
Request.QueryString["Name"]
is not actually null?
A string is nullable. That means if while accessing the QueryString it can't find the provided key (e.g. "studentName" it might very likely return null.
If you call the method ".ToString()" or ".Trim()" on this null string this will raise an exception.
(Note: you're using 2 different keys for accessing the name, I don't know however if that is intended.)
|
|
|
|
|
Don't double post the same question.
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["Name"].ToString().Trim() == "") lblStudentName.Text = "No Record Found"; else lblStudentName.Text = Request.QueryString["Name"].ToString().Trim();
if (Request.QueryString["Code"].ToString().Trim() == "") lblStudentCode.Text = "No Record Found"; else lblStudentCode.Text = Request.QueryString["Code"].ToString().Trim();
}
|
|
|
|