|
It may be somewhat odd to discuss about older technologies, but it has always been interesting to me to know that about.
Ok, I have the following as my "filename.htx" file:
<TABLE BORDER="1" CELLPADDING="2" WIDTH="100%">
<TBODY>
<%begindetail%>
<TR VALIGN=TOP>
<TD><%LastName%></TD>
<TD><%FirstName%></TD>
<TD><%EMail%></TD>
</TR>
<%enddetail%>
</TBODY>
</TABLE>
And here is my "addto.idc" file:
Datasource:Address_IDC
Template:filename.htx
SQLStatement:INSERT INTO Addresses(LastName, FirstName, EMail) VALUES('%FName%', '%LName%', '%Email%')
It works fine as it inserts data to database, but I need to display all records stored after the above insertion. What can I do?
N.B. SQL Server uses "output inserted" clause to do so but I haven't tested with that. I use Access 2007 as the database.
Real Eyes Realize Real Lies.
|
|
|
|
|
And how is this related to ASP.NET?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Where should I post that question?
I could also post that in "web development" or "database" section. But the question is also not really related to any of those section above.
Real Eyes Realize Real Lies.
|
|
|
|
|
Post it in Web development forum since this looks to be a question related to ASP,
There you might get correct answer , here most people have either not worked on ASP or have forgotten it long time back
|
|
|
|
|
Hi All,
I have one requirement i have one page which contain patient Id , patient name , patient last name text box
it has one search button if i click one this button on pop up should come and there user can search record those record should come in grid so when user click on any record it should fill those details into the above text boxes.
is it possible if yes can u guys give me direction.
thanks,
Amit
|
|
|
|
|
|
Yes, it is possible
use grid view with tampate control with radio buttons. The user will select one, and click on submit.
The get the selected row record and fill the values in textboxes
Rating always..... WELCOME
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi guys,
I am working MVC and entity framework to build up my knowledge.
I craeted database. then I create Entity framework in Model Folder.next, Create View.
In Model Folder I created Partial class which the purpose of this class is to encapsulate the data which interact with aother layers or DB.
So far, I haven't any problem because I realized everything regarding Entity framework. the problem is I don't know what is next step. What I have to write. I just wanna get same data from database and show them up on the form.
Please someone help me in this matter,
what is next step?
thx heaps
|
|
|
|
|
|
Hi, Firstly, thank you for your help.
Look, I followed the steps. I created a Controller.(Customer Controller)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Practice1.Models;
using Practice1.Models.Repository;
namespace Practice1.Controllers
{
[HandleError]
public class CustomerController : Controller
{
TestDBEntities _db;
public CustomerController()
{
TestDBEntities _db = new TestDBEntities();
}
public ActionResult Index()
{
ViewData.Model = _db.Tbl_Customer.ToList();
return View();
}
public ActionResult About()
{
return View();
}
}
}
AS, I am following your link, I got confused. Could you please tell me where I have to add this code? which part? do I need to create another class
ViewData.Model = _db.MovieSet.ToList();
ViewData.Model = (from m in _db.MovieSet select m).ToList();
|
|
|
|
|
Hi,
The controller should be placed in the controllers directory in the MVC project.
About the two lines of code you wrote:
ViewData.Model = _db.MovieSet.ToList();
ViewData.Model = (from m in _db.MovieSet select m).ToList();
They are doing the same thing. The first is getting all the movies form the database and returns them as list using the context you use. The second uses Linq to Entities to return all the movies from the database as list.
|
|
|
|
|
i have a dataGrid view in my windows form and now i want bind it programatically. i write this code::
string ConnString = "";
sqlConnection conn = new SqlConnection (ConnString);
string sql = "";
sqlDataAdapter da = new SqlDataAdapter(sql,conn);
conn.open()l
dataset ds = new dataset();
da.fill(ds);
conn.close();
datagridview1.DataSource = ds;
my code is right and ds hase 1 record and fill right but my grid dont show any record
do u know why?
has anything that i dont
|
|
|
|
|
your code is incomplete. Add the following line end of your code.
datagridview1.Databind();
|
|
|
|
|
but my form is windows form not web form and it has no databind,
what is insted of that in windows form?
|
|
|
|
|
ptvce wrote: but my form is windows form not web form
Then why you posted this question in ASP.Net forum, you should have posted it in C# forum.
|
|
|
|
|
1. Don't cross post at multiple forums. Pick one and stick to it.
Repost[^]
|
|
|
|
|
datagridview1.DataSource = ds.Tables[0];
|
|
|
|
|
|
Hallo everybody, I am using using a Custom control inside an aspx page and such user control includes a public property, so I need to access from the aspx.cs to the object created and stablish a value for the public property, but I have problem because the page doesn't recognize the object, the register data is:
<%@ Register TagPrefix="Data" TagName="Navegador" Src="~/Controles_Usuario/Navegador.ascx" %>
and the inclusion sentence: <data:navegador id="NV1" runat="Server">
later from the aspx.cs code I try to access to NV1.Property1 = 1;
and it yields an error telling that the page doesn't recognize NV1 and if I define it with protected Navegador NV1, the error is JUST REDEFINED
So Please where is the error, because I find this kind of errors each time when I use Custom Controls.
|
|
|
|
|
Hi guys, I am new in Entityframework and trying to get more knowledge. I have got one question and hope u guys help me out.
When we create Entity Model, after finish the process, a class designer.cs created automatically. why this file created and what we have to write in this file?
thx
|
|
|
|
|
A little googling[^] will help you.
Just try to explore it by yourself.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi,
The class designer.cs is the product of code generation which create the relevant entities and context that you will need in order to communicate with the database. You shouldn't change the generated code! All the entities and the context are created as partial classes so you can add your own behavior in another partial class.
I hope it will help you.
|
|
|
|
|
Hi every1,
Could you please, some one tell me in explicit language what is ORM and what are the advantages of using it?
thx
|
|
|
|
|
Well,
ORM in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language.
Simple details about it can be read here: WIKI ORM[^]
|
|
|
|
|
Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language.
Advantages of ORM as as follows:
1. Facilitates implementing the Domain Model pattern.
2. Huge reduction in code.
3. Changes to the object model are made in one place.
4. Rich query capability.
5. Navigation.
6. Data loads are completely configurable allowing you to load the data appropriate for each scenario.
7. Concurrency support.
8. Cache managment.
9. Transaction management and Isolation.
10. Key Management.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|