|
when you want to know that which checkbox has been checked? Do you want to go to the server when user has checked any checkbox or after user checked the checkbox and clicks on some button?
Best Regards,
Apurva Kaushal
|
|
|
|
|
yup.. user will click the "OK" button after checked the checbox on the selected record. User will be redirect to the page which the user have checked. If the user check more then 1 checkbox, user will be redirect to the report type page one follow another.
Best Regards,
Pei Sun
|
|
|
|
|
And what will happen if the user has checked for the multiple rows of the datagrid (ofcourse different options in the checkbox)?
Best Regards,
Apurva Kaushal
|
|
|
|
|
User only can select one row at a time because i use radio button to select the row.
Best Regards,
Pei Sun
|
|
|
|
|
Then you can use foreach loop to iterate through all the rows and then can find the checkbox and their value and do the operation as required.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Is it possible to keep the checkbox value and pass to another page? Because i need the checkbox value to perform another operation. Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
No directly it is not possible but what you can do is you can store it in some session variable or if it is not big then can also be send through querystring.
Best Regards,
Apurva Kaushal
|
|
|
|
|
how to write the code using query string? The value of the checkbox is which page the user will be redirect to. If use session, how the code looks like? Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
suppose if you want to use session state then you can store the value like this:
Session["varName"] = "value what you want to store";
same way you can retrieve also:
string str = Session["varName"].ToString();
For querystring like this:
URL?varName="value what you want to pass";
and to retrieve :
str = Request.QueryString["varName"].ToString();
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks so much.. This help me a lot and make me more clear. Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
always welcome ..
Best Regards,
Apurva Kaushal
|
|
|
|
|
In the message, you failed to state the exact problem that you are facing.
Use TemplateColumn for the radio buttons and checkboxes. Then you can access those controls using FindControl() method of the datagrid cell.
Thanks,
Pradipta Basu
|
|
|
|
|
Hi.. my problem is in the datagrid i got 4 columns are chechbox. Each of the column with checkbox represent different type of report printing format( that is each column's checkbox will be redirect to the specify report page when the user checked on it). When user checked the checkbox, how i get to know the status on which report need to be printed out by the user.
Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
Once you bind the checkboxes in the grid using item template or template column,
In print button_click u can access that checkboxes
i.e
1)get the row object of your grid
2)get the checkboxes reference
CheckBox cb1=rowobj.findcontrol('checkbox name');
-do- for 4 chkboxes
3)if(cb.checked)
{
write u r code here
}
|
|
|
|
|
can u provide me more deatails sample. Thanks..
Best Regards,
Pei Sun
|
|
|
|
|
I can not seem to figure out what the problem is with my code. (I
will post after my problem/question). If you perform a search of
categories in Horror, there are 4 titles that appear. I then click
on a title. The details for the title appear. When I perform
another search for a title, actor or director that exists in the
database it will search but the details of the movie I had previewed
stays on the screen. Any help is appreciated. Thanks, Terri Klepzig
Here is my code:
<%@ Page Language="c#" runat="server" debug="true" %>
<%@ Register TagPrefix="Terri" TagName="rColumn" Src="rColumn.ascx" %
>
<%@ Register TagPrefix="Terri" TagName="TopNav" Src="topnav.ascx" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
OleDbConnection conn = new OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=E:\\users\\terriklepzig\\wwwroot\\data1\\StudentFB.mdb");
protected void Page_Load(Object Src, EventArgs E)
{
if (!IsPostBack)
{
string loadSQL = "Select * From movies Where New=True";
search(loadSQL);
GetCats();
rptMain.Visible = true;
rptDetail.Visible = false;
}
}
public void GetCats()
{
string catSQL = "SELECT * FROM lookCategory";
OleDbCommand cmdCat = new OleDbCommand(catSQL, conn);
conn.Open();
ddlCat.DataSource = cmdCat.ExecuteReader();
ddlCat.DataTextField = "Category";
ddlCat.DataValueField = "Category";
ddlCat.DataBind();
ddlCat.Items.Insert(0, new ListItem("<-select->", ""));
conn.Close();
}
public void buildCats(Object s, EventArgs e)
{
string SQL1 = "SELECT * FROM movies WHERE Category = '" +
ddlCat.SelectedItem.Value + "'";
lbHeader.Text = "Search: Categories: " +
ddlCat.SelectedItem.Value;
search(SQL1);
}
public void BuildSearch(object sender, EventArgs e)
{
string sqlSearch ="Select * from movies WHERE " +
ddlTAD.SelectedItem.Text + " LIKE '%" + tbSearch.Text + "%'";
lbHeader.Text = "Search: " + ddlTAD.SelectedItem.Text + ": "
+ tbSearch.Text;
search(sqlSearch);
}
public void search(string sSQL)
{
OleDbCommand CmdSch = new OleDbCommand(sSQL, conn);
conn.Open();
rptMain.DataSource = CmdSch.ExecuteReader();
rptMain.DataBind();
conn.Close();
}
public void cmdCheck(object sender, RepeaterCommandEventArgs e)
{
if (e.CommandName == "Details")
{
LinkButton lbtnSelected = new LinkButton();
lbtnSelected.Text = ((LinkButton)
e.CommandSource).Text;
string sTitle = lbtnSelected.Text;
string SQL8 = "SELECT * FROM movies WHERE Title = '"
+ lbtnSelected.Text + "'";
showDetails(sTitle, SQL8);
}
}
public void showDetails(string sTitle, string sSQL)
{
lbHeader.Text = "Details For: " + sTitle;
OleDbCommand cmd8 = new OleDbCommand(sSQL, conn);
conn.Open();
rptDetail.DataSource = cmd8.ExecuteReader();
rptDetail.DataBind();
rptMain.Visible = false;
rptDetail.Visible = true;
conn.Close();
}
<title>Untitled Document
Flashbang Entertainment
<terri:topnav runat="server">
|
Search -
<asp:dropdownlist id="ddlTAD" runat="server">
<asp:listitem value="Actors">Actors
<asp:listitem value="Director">Director
<asp:listitem
value="title">Title
For
<asp:textbox id="tbSearch" columns="14"
runat="server">
<asp:button id="btSearch" text="Go" runat="server"
onclick="BuildSearch">
Search Categories:
<asp:dropdownlist id="ddlCat"
runat="server">
<asp:button id="btSearchCats" text="Go" runat="server"
onclick="buildCats">
|
Member Login: (tbUser) (tbPass)
(btLogin)
|
|
<asp:label
id="lbheader" text="New Movies"
runat="server">
<asp:repeater id="rptMain" runat="server"
onitemcommand="cmdCheck">
<itemtemplate>
<asp:linkbutton commandname="Details"
runat="server" text="<%# DataBinder.Eval
(Container.DataItem, "Title") %>">
<asp:repeater runat="server" id="rptDetail">
<itemtemplate>
| | Back | | Title: | <%# DataBinder.Eval(Container.DataItem, "Title") %
> | Actors: | <%# DataBinder.Eval(Container.DataItem, "Actors") %
> | Director: | <%# DataBinder.Eval(Container.DataItem, "Director") %
> | Studio: | <%# DataBinder.Eval(Container.DataItem, "Studio") %
> | Format: | <%# DataBinder.Eval(Container.DataItem, "Screen") %
> | Sound: | <%# DataBinder.Eval(Container.DataItem, "Sound") %
> | Runtime: | <%# DataBinder.Eval(Container.DataItem, "Time") %> | Rating: | <%# DataBinder.Eval(Container.DataItem, "Rating") %
> | Features: | <%# DataBinder.Eval(Container.DataItem, "Features") %
> | Language: | <%# DataBinder.Eval(Container.DataItem, "Languages") %
> | Synopsis: | <%# DataBinder.Eval
(Container.DataItem, "Synopsis") %> | |
|
| <terri:rcolumn runat="server">
| Copyright © 2005,
FlashBangEntertainment, All Rights Resrved |
|
|
|
|
|
How in Asp.Net can you find the amount of time it took to generate the page? I see this sort of stuff on the bottom of websites all the time. Code or a link to a tutorial would be greatly appreciated
-- modified at 19:21 Wednesday 2nd August, 2006
|
|
|
|
|
You can't, really. You can get the execution time of part of the generation process, but not the whole. However, that is probably what the others that you saw does anyway. What you can't measure is the compilation and creation of the page object, and the rendering of the page. The compilation takes about three seconds for the first page, and the time used for object creation and page rendering doesn't vary very much, so it's not very interresting anyway.
Get the current time as early in the page creation process as you can, like in the PreInit or Init event. Then get the current time as late as possible while you still can put anything in the page, like in the PreRender event. Subtract the times and put the result in the page.
---
b { font-weight: normal; }
|
|
|
|
|
Okay thanks Guffa, I'll try doing something with that.
|
|
|
|
|
what ever guffa said is the better but slight change is
save the current time in
page on_init()
time1
page_render()
time2
procestime = time2-time1 then u will get absolute processtime
|
|
|
|
|
Hi Frens,
I have a normal html site running on the web,I have made a asp.net module(a single page) and i want to add that to my site...
So, is it possinble ???
I have tried by attaching that file but it is giving error something like this...in the Internet Explorer.....
Index of /test
Name Last modified Size Description
------------------------------------------------------------------------------
Parent Directory 02-Aug-2006 16:46 -
App_Data/ 02-Aug-2006 16:48 -
Default.aspx 02-Aug-2006 16:47 2k
Default.aspx.cs 02-Aug-2006 16:47 2k
Web.Config 02-Aug-2006 16:47 2k
------------------------------------------------------------------------------
Plz sort out my problem...it is very very urgent.......
Thanks to all readers of this question and who give their suggestions..
Live Life King Size
Asif
|
|
|
|
|
|
Thanks for the stuff....but my server on which i have my existing site is in unix platform....so is there any possibility to launch .net file in it???
Live Life King Size
Asif
|
|
|
|
|
|
Hi,
whenever i open Solution file in VS.NET 2003 i get the followig error.
"Some of the properties associated with the solution could not be read"
I tried the solution given in the MS article
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B841707
It did'nt work
I re-installed VS.NET, it does not work.
Pls help.
Thanks in advance
Priya
|
|
|
|