|
ReachMe@CodeProject wrote: but am not getting the desired output..
Well, you need to tell us what you were expecting and what you got. How do we know what is the desired output?
Yusuf
|
|
|
|
|
how to insert selected rows of a gridview with multiple pages to a database in one click
Venkat P
|
|
|
|
|
Hello,
for your issue, you will have to include a few lines of code in your web-page.
( I AM ASSUMING YOU ARE USING ASP.NET 2.0 WITH C#. BELOW LOGIC REMAINS SAME WITH ANY FRAMEWORK AND ANY LANGUAGE)
1.) include a collection like object and make it a session variable.
e.g. Session["SelectedIds"] = Array[20];
2.) In this Array[20] you will need to keep including the " ROW IDENTIFIERS " to keep track of the row.
3.) While you are on page 1 of the gridview, let the user select whichever rows he wants, and then trap the event when he clicks on " page 2" or the "next button" of the gridview.
4.) here inside this event, Find the SelectedRows of the grid through the gridviews properties or iterate through the gridview control row-by-row to get to the checkbox control and check if its Checked property is true. If yes, the " row identifier" of this row to which this selected checkbox belongs should be stored in the Array[20].
5.) Finally store this Array[20] in the session.
6.) Repeat the above process for each navigation within the gridview pagination.
7.) finally on click of some "Submit" like button give a call to your Database and write a stored proc wherein you can pass this collection of selected ids, Array[20], and do the relevant processing to select the requried columns from the database and insert into the final table in the database as desired.
Let me know if this helps.
PLEASE DO NOT FORGET TO MARK AS ANSWER IF FOUND USEFUL/RELEVANT, SO THAT OTHERS CAN FIND IT EASILY.
Software Developer,
Pune,
India
|
|
|
|
|
Hello,
I am working on the page that will display a button for Save. Here I want some help from Javascript and in .CS file.
If that Save button is pressed, a message box should appear asking if the user is sure to Save or Update the record. If the user presses Yes then the browser goes to "If" loop to Save records in DataBase. If the user presses No then the user should go to If loop again and Update Those Records(If the records are already exists in the database) in the same page.
How can I do this job? I know that it might be a simple job but I suck in JS and in .CS file (I am not able to Get JavaScript Function Value[True and False] in .CS file.
Thanks...
|
|
|
|
|
You may need to have a custom opaque DIV to get this. JavaScript alert, I believe, supports only OK and CANCEL.
VbScript, however, has enumerations to support Yes, No.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
|
Hi,
I want to keep the url of my website static
for example:- "www.xyz.com" even on clicking to differnt links of my site.
As for now if i click on userprofile link of my site url appears like -
"www.xyz.com/member_profile.aspx" but i dont want to display these forms names. Anyone has any solution how to do this without using frames or user controls.
Help me out.!!!!
Dev
modified on Saturday, March 7, 2009 3:02 AM
|
|
|
|
|
|
You can rewrite the url in Application_BeginRequest.
Time is the best teacher; unfortunately it kills all of its students.
जय हिंद
|
|
|
|
|
Hi all,
I have to develop differant modules in dotnetnuke and using asp.net 3.5,
here i got stuck to integrate a asp.net application with a dotnet nuke.I have installed nuke and developed a mudule in which i find only ascx pages and ascx pages we need to use in nuke.can anyone please help me out in integrating a asp.net application with nuke with sample example or can provide steps or links with examples.
|
|
|
|
|
|
Hi,
i have to show values coming from dataset in to dropdown list,
when i tried like this
ddlRegion.SelectedValue = ds.Tables[0].Rows[0]["region_id"].ToString();
it is showing null value
ddlStatus.DataValueField = ds.Tables[0].Rows[0]["status_id"].ToString();
it is showing value while debugging but not displaying in dropdownlist
help me in populating data in dropdown.
|
|
|
|
|
have a look here[^] for a sample.
Calin
|
|
|
|
|
In your ddlStatus also assing the DataTextField.
ddlStatus.DataTextField= "Active"; // Text To be displayed in drop
down list.
ddlStatus.DataValueField = ds.Tables[0].Rows[0]["status_id"].ToString();
|
|
|
|
|
Please provide the complete code to know the problem.
Meanwhile ensure that you have set the control properly for DataTextField and Value Columns before DataBind
ddlRegion.DataTextField = "region_id"
ddlRegion.DataValueField = "region_value"
If the above code exists then when you assign values with either SelectedIndex or SelectedValue or SelectedText should work..
|
|
|
|
|
Hi every one!
i am facing a small issue pls help me out!
In my application i am playing a video in iframe (which is opening as pop up)in WM player or Quicktime player.My issue is whenever i close that pop up still that video is still playing in background.pls tell me how can i stop it's playing when ever that pop up is closed.
|
|
|
|
|
Hello Everybody
For Online Ordering System there is some criteria like
1. Add Product into Shopping Cart (product.aspx)
2. Shipping Address (shipping.aspx)
3. Make Payments (payments.aspx)
4. Confirmation (confirmation)
As Navaneeth said that keep order information into session table is not a good idea.
Now I facing some problem to keep pre-order information into tempOrder data table. So I need to know how will I handle the following information.
1. After adding product into shopping cart if the customer close the window then how will I delete that order information. (i do have custID into tempOrder table). How do I know browser is closed by customer or there is an internet connection problem.
2. All those 4 criteria has to be success before placing an order.
3. Mean anything happen before that time I have to delete order information for that customer
Please give me some idea.
Thanks in Advance
Sarfarj Ahmed
|
|
|
|
|
Sarfaraj Ahmed wrote: 1. After adding product into shopping cart if the customer close the window then how will I delete that order information. (i do have custID into tempOrder table). How do I know browser is closed by customer or there is an internet connection problem.
There is no way to know when a browser window is closed. You can do couple of tricks though
1- Set a JS timer on the client, when the timer is set, make a call to your server to end the session, then you can clean tempTable entry for the given custID.
2-Time Stamp your tempTable entry, then run a job on given interval to wipe out all expired records
3-On SessionEnd, clean your tempTable entries for the given custID
Yusuf
|
|
|
|
|
Dear Yusuf
Thank you very much for your help
Regards
Sarfaraj
Sarfarj Ahmed
|
|
|
|
|
I'm not sure if you can use Ajax and onunload enent
|
|
|
|
|
Hi Guys
You have probably heard this question before.
I sit and try to create a Master Page with nested Master Page in
That I had intended is this:
I have a Master Page (globalMaster.Master) which contain the Header and Footer.
In the Master Page I have a nested master of the left menu (leftColumnNav.master) and right menu (RightColumnNav.master)
In addition, I have Content Placeholder for my content.
My problem is that I neither get my left or right menus to show. While the text in the middle (content) is showing fine.
I lists the code (yes is f. ..... long)
What do I do wrong and is there a more clever way to do it.
Themes?
I'm using VS2008
GLOBAL MASTER
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="GlobalMaster.master.vb" Inherits="WorkMasterpages.GlobalMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TESTER Masterpage</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<link href="xxxxx.css" rel="stylesheet" type="text/css" />
<link href="yyyyy.css" rel="stylesheet" type="text/css" />
</head>
<body class="White">
<div id="main_wrapper">
<div id="header">
<div id="header_inner">
<h1>Tester</h1>
</div>
</div>
<div id="threecolwrap">
<!--encloses the three columns-->
<div id="twocolwrap">
<!-- encloses the left and center columns-->
<div id="nav">
<!-- the left column-->
<ASP:CONTENTPLACEHOLDER ID="LEFTCOLUMNNAV" RUNAT="SERVER"></ASP:CONTENTPLACEHOLDER>
</div>
<!-- end nav div -->
<div id="content">
<!-- the center column -->
<div id="content_inner">
<ASP:CONTENTPLACEHOLDER ID="CONTENTPLACEHOLDER1" RUNAT="SERVER"></ASP:CONTENTPLACEHOLDER>
</div>
<!-- end content inner -->
</div>
<!--end of content div-->
</div>
<!--end of twocolwrap-->
<div id="promo">
<ASP:CONTENTPLACEHOLDER ID="RIGHTCOLUMNNAV" RUNAT="SERVER"></ASP:CONTENTPLACEHOLDER>
<!--end of inner promo div-->
</div>
<!--end of promo div-->
</div>
<!--end of threecolwrap div-->
<div id="footer">
<div id="footer_inner">
<p>Footer</p>
</div>
<!--end of footer inner div-->
</div>
<!--end footer -->
</div>
<!--end main_wrapper-->
</body>
</html>
------------------------
leftColumnNav
<%@ Master Language="VB" MasterPageFile="~/GlobalMaster.Master" AutoEventWireup="false" CodeBehind="LeftColumnNavMaster.master.vb" Inherits="WorkMasterpages.LeftColumnNavMaster" %>
<asp:Content ID="Content2" ContentPlaceHolderID="leftColumnNav" runat="server">
<div id="nav_inner">
<ul>
<li><a href="#">Nav item 1</a></li>
<li><a href="#">Nav item 2</a></li>
</ul>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
----------------------
RightColumnNav
<%@ Master Language="VB" MasterPageFile="~/GlobalMaster.Master" AutoEventWireup="false" CodeBehind="RightColumnNav.master.vb" Inherits="WorkMasterpages.RightColumnNav" %>
<asp:Content ID="Content4" ContentPlaceHolderID="RightColumnNav" runat="server">
<div id="promo_inner">
<h3>Højre menu</h3>
<p>tester</p>
</div>
</asp:Content>
---------------------
This page is used to view the content. Is not a master page but a plain. . aspx
<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/GlobalMaster.Master" CodeBehind="Home.aspx.vb" Inherits="WorkMasterpages.Home"
title="Untitled Page" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2>xxxxx</h2>
<p> bla bla bla bla</p>
</asp:Content>
|
|
|
|
|
don't post the same question again. If you make a mistake, you can use the delete button to delete the second entry.
Yusuf
|
|
|
|
|
|
Hi Guys
You have probably heard this question before.
I sit and try to create a Master Page with nested Master Page in
That I had intended is this:
I have a Master Page (globalMaster.Master) which contain the Header and Footer.
In the Master Page I have a nested master of the left menu (leftColumnNav.master) and right menu (RightColumnNav.master)
In addition, I have Content Placeholder for my content.
My problem is that I neither get my left or right menus to show. While the text in the middle (content) is showing fine.
I lists the code (yes is f. ..... long)
What do I do wrong and is there a more clever way to do it.
Themes?
I'm using VS2008
GLOBAL MASTER
]]>
<title>TESTER Masterpage
<asp:contentplaceholder id="head" runat="server" xmlns:asp="#unknown">
<asp:contentplaceholder id="LEFTCOLUMNNAV" runat="SERVER" xmlns:asp="#unknown">
<asp:contentplaceholder id="CONTENTPLACEHOLDER1" runat="SERVER" xmlns:asp="#unknown">
<asp:contentplaceholder id="RIGHTCOLUMNNAV" runat="SERVER" xmlns:asp="#unknown">
------------------------
leftColumnNav
]]>
<asp:content id="Content2" contentplaceholderid="leftColumnNav" runat="server" xmlns:asp="#unknown">
<asp:content id="Content3" contentplaceholderid="ContentPlaceHolder1" runat="server" xmlns:asp="#unknown">
----------------------
RightColumnNav
]]>
<asp:content id="Content4" contentplaceholderid="RightColumnNav" runat="server" xmlns:asp="#unknown">
---------------------
This page is used to view the content. Is not a master page but a plain. . aspx
]]>
<asp:content id="Content2" contentplaceholderid="ContentPlaceHolder1" runat="server" xmlns:asp="#unknown">
xxxxx
bla bla bla bla
|
|
|
|
|