|
There are several ways to pass data to another page.
-Query string might be an option.
-You can have public properties on target page and set it from source page.
- Session is always an option but if you need to pass another page then dont need to use this
For more details Have a look
|
|
|
|
|
you can use querystring, but if your data need to be secured be sure to encrypt the Query String
http://himabinduvejella.blogspot.com
Iblog
"If you can dream IT, you can become IT"
|
|
|
|
|
|
You can do this via Session. But there are many way to do the same. If your data is not sensitive then use query string. if that will be sensitive then encrypt that data and then put it into Query String.
ANAND KUMAR
Owner www.csharpmagic.com
www.asbrainz.com
|
|
|
|
|
Hello my dear
i want to know the difference between Serialization and persistence
j somasekhar
|
|
|
|
|
Serialization is the process of converting an object into a stream.
Serialization[^]
Persistence is something that is performed on a stream (something that was serialized) such as storing in a DataBase of File.
Introduction to Persistence[^]
Updated with link for MSDN Introduction to Persistence.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Serialization is a way to persist data from none persistent medium to persistent medium.
ANAND KUMAR
Owner www.csharpmagic.com
www.asbrainz.com
|
|
|
|
|
Hello,
I have developed one web application in asp.net(in VSTS 2008) and moved to production server by taking backup of database and files, Later i have included lot of new modules and functionality in developement server.
My question is how to move updated files (Modules with database) to production server, with out losing of existing data in production server.
do we have any tools to update whenever we build in visual sutdio, or any specail process is there?
Please help me, and let me know any vedios or articles available on this topic.
Pinna
|
|
|
|
|
Well as far as your Modules go, if you are just talking libraries (dlls), you should just be able to overwrite the existing Modules.
For the DB, this is a little trickier if you know exactly what fields changed you should be able to just write an update statement for the tables that have changed. If you don't know what tables changed you can use a third party tool, something like APEX SqlDiff[^] to run the comparison and generated the scripts for you. It's a little pricey but I’m not sure what your budget is. If it's just a onetime thing, I think the trial might do.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
For MSSQL server there is a free toolSqlDbDiff[^] which does a decent job of comparing databases.
|
|
|
|
|
Never heard of this one before, looks nice and you can't beat that price.
Thanks for the info
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi,
Thanks for your reply.
I am not talking about libraries(dlls), i am just saying about aspx files, and came to known we can move updated files from production server to development server using Team foundation server, but i dont know the process am looking for tutorials.
Pinna
|
|
|
|
|
Copy & Paste replacing the old ones with new ones, if you have customizations to the web.config don't overwrite that or you will have to make the changes again, by changes I mean values. obviously overwriting the web.config will remove all changes to the previous version
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi,
I am getting error as 'Sys' is undefined.
The above error occures in production server only not in development server. I checked every setting and web.config. I am not getting any solution for this. I am using Ajax in this page.
Please help.
Thanks in advance
|
|
|
|
|
A very common error: a quick search on Google would have helped you:
Sys is undefined[^]
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
Hi guys, I'm new to MVC and ASP probably like a few days experience.
I've googled, looked through examples but not finding what I need.
I have a service which returns a
IEnumerable<ViewModel>
I consequently pass this Model into the View using
Inherits="System.Web.Mvc.ViewPage<IEnumerable<ViewModel>>"
I have an asp:GridView setup with no datasource.
How would I bind the model that is passed into the View to the GridView?
I'm currently doing it like this but I would really like to have it in a gridview whereby i can sort the information and apply filters since I don't want to access the SQL DB directly from the ASP page and use the service to access it then return the Model like I am.
<ul>
<% foreach (var vm in ViewModel) { %>
<li>
<%= Html.ActionLink("Edit", "Edit", new { id = vm.ClientCode })%>
<%= Html.Encode(vm.ClientCode)%>
is the code for
<%= Html.Encode(vm.ClientName)%>
<%= Html.Encode(vm.ClientSurname)%>
</li>
<% } %>
</ul>
|
|
|
|
|
I have a problem of integration of the city code in the table of the employer database, it always inserts the last record in the table and here is the city code used:
protected void Page_Load(object sender, EventArgs e)
{
foreach (short vKey in city.Keys)
{
dropdownlist1.Items.Add(city[vKey].cityName);
dropdownlist1.DataTextField = city[vKey].cityName;
dropdownlist1.DataValueField = (city[vKey].id_city).ToString();
}
}
and the code in the button is:
employer.cityName= short.Parse(dropdownliste1.DataValueField);
employer.insert();
|
|
|
|
|
if(!IsPostBack)
{
foreach (short vKey in city.Keys)
{
dropdownlist1.Items.Add(city[vKey].cityName);
dropdownlist1.DataTextField = city[vKey].cityName;
dropdownlist1.DataValueField = (city[vKey].id_city).ToString();
}
}
|
|
|
|
|
Wrap in IsPostback .
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
foreach (short vKey in city.Keys)
{
dropdownlist1.Items.Add(city[vKey].cityName);
dropdownlist1.DataTextField = city[vKey].cityName;
dropdownlist1.DataValueField = (city[vKey].id_city).ToString();
}
}
}
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
Ignoring the number of seconds, we both replied exactly on the same time
|
|
|
|
|
Great minds think alike!
I've noticed this before though it doesn't mean anything. I think. Or maybe...
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
ok , thank you very much for both of you, but it does not work with IsPostBack, it always inserts the last record in the table table in town employer, as in adding the new num employer must record the index of the choice of city and not the name of the city
|
|
|
|
|
Try:
employer.cityName = dropdownliste1.SelectedItem.Value;
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|
|
Unfortunately, it doesn't work
|
|
|
|
|
Hmm: well, I was intrigued so I knocked up a wee app to simulate what you are doing and, for me, it works. That is, wrapping with both bits of code.
Have you checked to see what it is you're actually outputting to the list; is each id unique or are they all the same?
Can't really see a reason why this should not work as advertised. (Course I can't actually see what you are doing!)
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
nils illegitimus carborundum
|
|
|
|