|
If you use object of Table class, it is must to provide the actual table map attribute on the header.
I think the DBML you made doesnt have the actual tables in the database. Just change the connectionstring and create the table structure as mentioned in the DBML.
This error will wiped out automatically....
|
|
|
|
|
I'm going through a tutorial which mentions the use of:
<br />
1. <asp: Label ID="myLabel" runat="server" Text=<%# boundMessage() %/><br />
This does not seem to compile. Error message: <br />
Attribute values must be enclosed in quotation marks.<br />
<br />
2. <%DataBinder.Eval (Container.DataItem, "SupID" %><br />
This does not compile. Error message:<br />
The name 'Container does not exist in the current context'<br />
<br />
3. When I use the following connection string, I get an error from SQL Server, only on DELETE <br />
statements:<br />
hookUp = new SqlConnection("Database=localhost\\$INSTANCENAME; Database=$DATABASE_NAME; Integrated Security = True".<br />
<br />
I resolved this by using the connection string generated by Visual Studio and the code compiled fine (lazy fashion), however, I could not understand how the same connection string returned no errors with<br />
SQL UPDATE and SELECT statements.<br />
<br />
Reference book
ASP.NET 3.5 - A Beginner's Guide written by William B. Sanders (2009).
Jon
|
|
|
|
|
jon_80 wrote: Attribute values must be enclosed in quotation marks.
Correct.
Text="<%# boundMessage() %>"
jon_80 wrote: The name 'Container does not exist in the current context'
I assume this code exists outside of a bound control. Actually, I think you need to use <%# or <%= ( I forget which )
jon_80 wrote: When I use the following connection string, I get an error from SQL Server, only on DELETE
statements:
And what is the error ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Well, I tried
<asp:Label ID="BindMe" runat="server" Text=<%= boundMessage() %/> to no avail, because VS generated the following error:
Server tags cannot contain <% ... %> constructs.
Jon
|
|
|
|
|
When first released, ASP.NET lacked a template engine.
So now, for .NET 2.0, ARE "master pages", ASP.NET'S version of a template Engine?
If no, how do regular Template engines (StringTemplate) differ from 'Master Pages'?
Thanks in advance,
Laura
|
|
|
|
|
A master page provides a template for all pages, by providing for some areas to be common to all pages, and yet written once. I have no idea how this differs from what you regard a template engine to be, but it feels like a good fit to me.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
hi..in my project..i m dng an execution of exe file(an updation of software version) for a software present in the different machine...i,e,the update file is present in one machine, and the real software is present in differetn machien..
when i run the update file,specifically an exe file, the update should go to the specifed machine software...i want to this in a asp.net web site
thanks,in advance
|
|
|
|
|
You can't. Imagine if any website could run any exe on your machine. Not a nice idea, is it ? You can provide a local link to a file path you assume exists, or have people just download and run it, but you can't make it run without the user asking it to.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
I've used a CreateUserWizard control to create a user and send an email, informing the user of their account username and password. That works great and saves loads of effort because it does all the email stuff for me including using a text file that I use for the email's body and handling SMTP errors, etc.
My question concerns the fact that I also want to create a user programatically. Is there any way I can use the CreateUserWizard control to create a user and send an email without any user interaction?
Thanks
|
|
|
|
|
More detail...
For example, my code is like this:
CreateUserWizard cuw = new CreateUserWizard();
cuw.UserName = "freddy";
cuw.Email = "myemail@somewhere.com";
cuw.MailDefinition.From = "myemail@somewhereelse.com";
cuw.MailDefinition.Subject = "New Account";
cuw.MailDefinition.BodyFileName = "~/body.txt";
cuw.AutoGeneratePassword = true;
cuw.LoginCreatedUser = false;
cuw.RequireEmail = true;
WizardStep step = new WizardStep();
step.StepType = WizardStepType.Start;
step.Title = "Create User Step";
step.ID = "CreateUserStep";
CompleteWizardStep cws = new CompleteWizardStep();
cws.ID = "wsCompletedStep";
cuw.WizardSteps.Add(step);
cuw.WizardSteps.Add(cws);
cuw.MoveTo(cuw.WizardSteps[0]);
cuw.MoveTo(cuw.WizardSteps[1]);
So I only have two steps, one to create the user and send the email and the other to complete the wizard.
I run this code but nothing happens. Is it even possible to use the control like this? It would be great if I can because it saves me so much effort writing methods to send email and utilise an external text file as the email body plus all the error handling the CreateUserWizard has.
|
|
|
|
|
hai..i m doing a project which involves comparison of two ms-access files, the ms-access database contains software name,version number. first,two access files contain the installed software list of two machines along with their version),since the version can be different in different machine..
ex:
caption softversion
Adobe AIR 1.0.8.4990
the application opera along with its version...similarly it contains a lot of software along with version in access fields(it contains all softwares installed in the system).
what i want to do is i have to give the name of the software in a textbox(ASP.NET),for it i want to compare the version fields for the two access database.if there exists a difference, i want to report it in a msgbox,otherwise "same version present" should be shown. I want this to implement in ASP.NET,i hav the two files in same folder..
can anybody help me with good asp.net code?? i tried of lot of methods..is ther any solution..pls reply...soon
thanks in advance....
|
|
|
|
|
Why do you want to do this in ASP.NET, if the files are local ? I doubt you can.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello,
Thank you for providing such valuable information on this site. Well i am a student and i am creating one web application where i want to demonstrate a very simple mobile SMS transmission from my ASP.NET application to a single mobile no (Only one mobile Number!).
I would like to know if there is any work around to accomplish that without using web services or internet connection (i mean if we could just connect the mobile to the pc using data cable and just can send any Message to that, or by using other tools like PC Suit or something like that using .net platform). I would really appreciate a help from ur end as soon as possible as i need to submit the application in my college.
Thanks in advance
|
|
|
|
|
I used the window.print(); Method to Print the Document. Is it Possible to print the Document with out Title, Page No top of the Page and URL and date bottom of the Page and Print bottom also.
B'coze they are displayed in my Printed Page.
Mohan Balal
|
|
|
|
|
From javascript its not possible. you can make a server call and show data as PDF file for printing.
Prince
Quest Solutions
www.imaginethinkact.com
|
|
|
|
|
Thanks for the Reply. Please send the code for that If you have or URL.
|
|
|
|
|
Which type of document are you going to print? If your document is an ASP.NET page, then you can hide some specific parts of the page by using JavaScript's style.visiblity = none before calling the window.print method.
Either you love IT or leave IT...
|
|
|
|
|
Is it correct to create a struct that is nested within a class e.g.
public partial class _Default : System.Web.UI.Page
{
protected struct SupportStruc
{
protected string var1
protected string var2
}
SupportStruc supporter = new SupportStruc();
protected void Page_Load (..) {
supporter... //var1 and var2 are not displayed here...
}
}
Jon
|
|
|
|
|
It's neither correct nor incorrect.
I try to limit nested types to private types only used from within the outer type, and you'll find that the .NET Framework has only very few public nested types.
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
Thanks, I agree with that, as a matter of fact I wanted to use the inner struct from the outer class. The problem is that Intellisense did not display any of the fields of the struct...
Jon
|
|
|
|
|
I have button in footer template
clicking on button while generate the total of grid view rows
now i want to call the button event after grid databound
my code:
Grid view footer template:
<FooterTemplate><asp:Button ID="btnTotal" runat="server" Text="Generate Total" Width="200px" OnClick="GenerateTotal" /></FooterTemplate>
Function:
Protected Sub GenerateTotal(ByVal sender As Object, ByVal e As EventArgs)
// Some Code
End Sub
One person's data is another person's program.
--J.Walia
|
|
|
|
|
Your question is not clear. Can you please ellaborate a little so that we can help you out.
Either you love IT or leave IT...
|
|
|
|
|
I want to control some hardware by internet. In order to do that I want to use ASP.NET and C# language. Suppose I want to turn on a LED which is placed in a PCB board. That PCB board is connected to a computer which has internet connection. From remote distance I will do some thing so that that LED will be turned on. If any body know some things abut the above meter please inform me as soon as possible.
Rashed
|
|
|
|
|
ASP.NET does not do that. To do this inside the browser, you would need an activeX control. Unless the LED is on the server, then it's easy.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
As nicely and truely said by Christian, you have to use activex control with in your asp.net page which itself will take care of the interaction with the hardware. So whatever code you want to write to controll the hardware, have to be written inside the activex control. Your asp.net page will only call the methods that you have defined in the activex control to maintain hardware. This is not an easy job though but there is nothing called impossible. So all the best.
Either you love IT or leave IT...
|
|
|
|