|
|
Hi,
I am having 2 table. I want to delete records having same ID within 1 query.
e.g.
ID name
table1 1 a
table2 1 b
How can I do?
Thanks
|
|
|
|
|
you may want to ask this in sql section
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
I have several pages ( suppose default.aspx, page1.aspx, page2.aspx,page3.aspx,page4.aspx) now what I need to do is from default page I need to navigate to either of other pages say page2.aspx or may be page3.aspx depending on the initial setting which I want to store in database.
Suppose I have first group of pages navigation as (Default.aspx-> page3.aspx-> page4.aspx)
And second group of pages navigation as (Default.aspx-> page1.aspx->page5.aspx)
Now if user related to first group is logged in then he should get first group of page navigation. And if user related to second group is logged in then he should get second group of page navigation(but how??)
How do I achieve this can any one please provide me simple logic
|
|
|
|
|
Not too sure what answer to provide but maybe assign a specific set of user rights to groups of users so that those groups can only access certain pages....?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
Hi
Can anyone help me in implementing paging for child grid while using childGrid inside parentGrid.
Thanks in advance
Honey
|
|
|
|
|
I have a grid view which contants a checkbox template column and a flag column. I need to make a div section of the page visible/invisible based on the flag of the row on which the checkbox is checked.
So i need to fire a checkbox click event on whcih I need to get the value of the second cell.
All these needs to be done in javascript.
Can any one help?
|
|
|
|
|
|
That will not help..
I want the event to be fired on the very time when the checkbox is clicked
|
|
|
|
|
I have taken dtalist inside the update panel. and inside datalist i'm rendering the images with a button. On click of that button i'm opening a popup to download that image. Without update panel its working fine but with update panel its not working.
Plz tell me what else i need to add to overcome this problem.
krishna veer singh
|
|
|
|
|
Here is one solution but in this case your page will be post back.
set PostBackTrigger to that button id.
<triggers>
<asp:postbacktrigger controlid="ImageButtonID" />
</triggers>
please don't forget to vote on the post that helped you.
|
|
|
|
|
Thank you for replying...
Bur here problem is that... on runtime more that one item is creating in datalist so we can't use that button id because that id gone change in runtime.
krishna veer singh
|
|
|
|
|
I have a dropdownlist control in my gridview
When somone chooses an option from it an event is ran
I need to get a datakey for that row, how would I do that?
thanks
|
|
|
|
|
Try this
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["here datakeyname"].ToString();
and in the source, for CommandArgument..
CommandArgument='<%#((GridViewRow)Container).RowIndex %>'
krishna veer singh
|
|
|
|
|
The event that is firing is an onclick event for the dropdownlist
Therefore
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values[""].ToString();
does not work because there is no command arguement for it
is there another way?
thanks
|
|
|
|
|
.netman wrote: The event that is firing is an onclick event for the dropdownlist
Therefore
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values[""].ToString();
Post your code where you create event handler of dropdownlist and dropdownlist event also
please don't forget to vote on the post that helped you.
|
|
|
|
|
DropDownList dr = (DropDownList)sender;
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["code"].ToString();
SqlCommand cmd_update_order = new SqlCommand("update_order", con);
cmd_update_order.CommandType = CommandType.StoredProcedure;
cmd_update_order.Parameters.Add(new SqlParameter("@order", SqlDbType.Int));
cmd_update_order.Parameters["@order"].Value = dr.SelectedValue;
cmd_update_order.Parameters.Add(new SqlParameter("@code", SqlDbType.VarChar));
cmd_update_order.Parameters["@code"].Value = str;
str should be the datakey but it is not working
thanks
|
|
|
|
|
.netman wrote: DropDownList dr = (DropDownList)sender;
string str = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Values["code"].ToString();
You can not get CommandArgument here
Set that in ToolTip property of dropdownlist when you create evend handler of DDL
On RowCreatedEvent
DropDownList ddl=(DropDownList)e.Row.FindControl("DDLID");
ddl.ToolTip=gv.DataKeys[e.Row.RowIndex].Value;
Now on SelectedIndexChange event
DropDownList dr = (DropDownList)sender;
string keyID=dr.ToolTip
....
.....
please don't forget to vote on the post that helped you.
|
|
|
|
|
error:
Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)
ddl.ToolTip = GridView1.DataKeys[e.Row.RowIndex].Value; // gv is your gridview
it throws an error for this line
How do I convert?
|
|
|
|
|
ok I changed to
ddl.ToolTip = GridView1.DataKeys[e.Row.RowIndex].Value.ToString();
and it now it shows
Index was out of range. Must be non-negative and less than the size of the collection.
why would this be?
cheers
|
|
|
|
|
Use the NamingContainer property of your DropDownList
So in your OnSelectedIndexChanged you can state
(GridViewRow) row = (GridViewRow)ddl.NamingContainer;
After that you can set
GridView.SelectedIndex = row.RowIndex;
At the end of the event add a line:
GridView.SelectedIndex = -1;
you do this to prevent showing a GridView with a Selected Line in it.
|
|
|
|
|
Plz tell me is it possible to use hiddenfield with session object.i am taken some values through session and some by hidden fields.at third page it is not taken the correct value of the session variable .
thanks...gaurav
|
|
|
|
|
By debugging, check your session value where it is getting changed.
Balasubramanian K.
|
|
|
|
|
Hi all,
can someone plz help me...im trying to load my page frmHome.aspx in my ContentPlaceHolder...can anyone help please.
living life on the flip side
|
|
|
|
|
did you select 'Load Masterpage' when creating this page?
|
|
|
|