|
sorry !! i mistyped it !!! i actually wanted to update a row in table.. i have a data grid with few columns in it . I want to edit each row and update it . when i try to click edit button it shows an exception (Invalid Operation) . Hope u got it now..
|
|
|
|
|
Here is the syntax of the UPDATE statement used to make changes to the existing records in table.
update tablename<br />
set columnname = newvalue [,columnxname = newvaluex...]<br />
where columnname OPERATOR value [and|or columnnamex OPERATOR valuex]
Compare this syntax with your UPDATE statement and check whether you have given it right.
Regards - J O H N -
|
|
|
|
|
Dear Friends,
How we can keep data after inserting in formview controls?.
When i'm inserting a record formview will fire a method, that method is calling a stored procedure. If Stored Procedure is return error i want to keep data in my formview.
How i can solve this issue?
Haridas.R
harisofttech@gmail.com
harisofttech@hotmail.com (online)
harizeenet@yahoo.co.in(online)
"Achievement is not a destination, its a journey "
|
|
|
|
|
I think having the ViewState Enabled for ur control should solve this problem
try having the EnableViewState=true in ur FormView
or save that record in the session and take it back on return
I hope it helps
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
I am using the Ajax control toolkit TabContainer.
When I place it on the page in design view instead of seeing the Tab control I see a little brown box.
I looks fine when I run the page - it just doesnt display how it will look in the design view.
Am I doing something wrong or is it supposed to be this way ?
Thanks
|
|
|
|
|
Hello everyone,
well I'm working in a module where i'm using a gridview to display data without binding it to it. Now its working but the only problem is that it doesnt sort in alternating ASC/DESC order like normal. I noticed while debugging that I was always getting the SortDirection in the OnSorting event as Ascending.
Is there some other way so that I can make the sorting in the usual Alternating way of ASC and DESC.
Hope u got what I'm saying
<asp:GridView ID="GridView1" runat="server" PageSize="20" DataKeyNames="DirectoryID" AutoGenerateColumns="False" AllowPaging="True"
OnPageIndexChanging="GridView1_PageIndexChanging" OnRowUpdating="GridView1_RowUpdating"
OnRowDeleting="GridView1_RowDeleting" AllowSorting="true" OnSorting="GridView1_OnSorting"
OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowCommand="EditButton_OnRowCommand">
<Columns>
<asp:TemplateField SortExpression="DirectoryID" HeaderText="DirectoryID" Visible="false">
<ItemTemplate>
<asp:Label ID="Label_ID" Text='<%# Eval("DirectoryID") %>' Runat="Server"/>
</ItemTemplate>
</asp:TemplateField>
...
and in the On sorting event I'm doin this
protected void GridView1_OnSorting(object sender, GridViewSortEventArgs e)
{
DataView dv = (DataView)Session["dvVD"];
if (dv != null)
{
//Vendor_Directory vd = new Vendor_Directory();
dv.Sort = e.SortExpression + ((e.SortDirection == SortDirection.Descending) ? " DESC": " ASC");
GridView1.DataSource = dv;
GridView1.DataBind();
}
}
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
This article[^] says that Gridview seems to have problem when we do sorting. The Value of SortDirection is always set to "Ascending". But the problem is sorted out having the sort Direction and Sort Expression in the Viewstate. Have a look, it may help you to solve the problem.
Regards - J O H N -
|
|
|
|
|
yes definately there's something wrong here and I'm looking at this article at the moment
http://community.strongcoders.com/content/CSGridViewSortingPaging.aspx
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
YES! I did it with the help of that article I mentioned earlier...
Thanks a lot for ur help John. I appreciate it
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
you're most welcome.
Regards - J O H N -
|
|
|
|
|
Hai friends,
I need to run a youtube uploaded movie to aspx page dynamically.I stored the embed tag in a sqlserver(2000)table with some label.I have a set of videos onclicking a particular name i need to run the corresponding video in aspx page.All movies are need to run in the same page itself.am using dotnet1.1 with c# coding.If anybody having idea please share and help to solve my problem...Thanks in advance
Regards
Bijesh
|
|
|
|
|
Yeah. You can show the embedded object in your aspx page but you won't be able to control the functionality of this media embedded object.That means you can't play/stop/pause the movie from code. All you can do is that you can show the different embedded media object according to what the user wanna see..
|
|
|
|
|
Hi,
Ok.control is not problem...I need to know some brief coding for this...I want to play the movies dynamically..Please help me to solve.
Regards
Bijesh
|
|
|
|
|
bijeshputhalath wrote: I want to play the movies dynamically..
As I said, you can't play/stop/pause the movie from code. What you can do is that you can show the different embedded object dynamically...
Let's say there are three buttons ( "Video1", "Video2" and "Video3") in your page. you can put those embedded script in three div.. if the user click on button1 then you can show div1 which contains the embedded script for "Video1".. If you know how to show/hide the div from Javascript, it can be done...
|
|
|
|
|
Hi,
I done with static.But my need is different.now i am briefly explain the details...
I have different products.all the products have differenet videos.(all the product details are entering in admin side including the movie tag which are stored in a table SQLSERVER2000 DB)
I shown the products in different images.while clicking the products details are displayed in another page.There is a button to watch the movie.while clicking the button the corresponing movie want to stream.while the user select the products,it shows all the details with a button to watch movie(all are comes under user side),only the corresponding movie want to run..videos are uploaded in youtube...all the products movie want to stream in the same page..My problem arises here..i can now stream only one movie,if i give the corresponding object tag.How dynamically stream the videos based on the choice without multiple buttons???Please help to solve...
i cant know how to embed object tags(movie tags )dynamically....If knows Please share me...
Thanks & Regards
Bijesh
|
|
|
|
|
Hi folks,
How to update newly cached object to the client with out any request from client.
friendly,
ranandbe
|
|
|
|
|
ranandbe wrote: How to update newly cached object to the client with out any request from client.
I'm not quiet sure about what you are asking. As far as I know a cached object will either have a dependency or time-duration, when there is a request from the client then it checks whether dependency or the duration is expired. If yes then the Cached object will get updated. You are asking How to update without any request from the client. If there's no request from the client why do you need to update the Cached object?
Regards - J O H N -
|
|
|
|
|
Hi friends
I have one button called Preview which is placed in upadate panel.
Now I want to open popup window on click of that button.
I can call javascript onclientclick event but before open popup window i want to get some values from current window.I dont want to pass that value in query string.
Here is my code
ClientScript.RegisterStartupScript(this.GetType(), "JS", "javascript:window.open('PreviewPop.aspx?DesignID=" + txtImageHide.Value + "','MyTitle','height=250,width=505, top=100, left=100, scrollbars=yes, resizable=yes, status=no')", true);
but popup window is not open.If I remove update panle then it works fine.
can anybody give me solution for this.
thanks in advance
bEst Regard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Imran Khan Pathan wrote: but popup window is not open.If I remove update panle then it works fine.
I guess registering client script blocks inside an update panel is not allowed. Create a dummy project with update panel, and try registering a client side script which alerts some thing ?
|
|
|
|
|
hi
I have2 question
1:I have a setup file of my website and I want to test it in localhost befor loading it,how can I do it?
2:I have a QueryString in web.config.when I want to load thesite on internet how shoud I change yhe address?
what should I write instead the name of computer?
|
|
|
|
|
M.V wrote: 1:I have a setup file of my website and I want to test it in localhost befor loading it,how can I do it?
If you have the setup file then it's very straightforward just double click on the .msi file and the wizard will take you through the Installation process.
M.V wrote: QueryString in web.config
What do you mean by this?
Query String is something related to URL, Not web.config file.
Regards - J O H N -
|
|
|
|
|
ohh sorry I mistyped.I meaned connectionstring
it works true when I test it in my local.I want to khnow
<connectionstrings>
<add name="connectionstring" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|projDb.mdf;Integrated Security=True;User Instance=True"
="" providername="System.Data.SqlClient">
for loading it on internet what change should I do?
thanks alot
-- modified at 12:55 Tuesday 6th November, 2007
|
|
|
|
|
Hello every body,
I am using sessions in my web-based application. After completion of all transactions i want to sign out. When i click sign out and copy the URL and paste it in browser. It is showing the contents of signed-in page.
Even I have used "Session.RemoveAll();" in global.asax file when the session ends
But If i click refresh and paste the URL it will not allow to show the contents of signed-in page.
How to refresh page only one time when i click sign-out.
Kindly send me the code...
Can any body plz..help me...
|
|
|
|
|
Use
Session.Abandon();
Response.Redirect("LoginPage.aspx?action=SessionExpired", true);
And on LoginPage.aspx check whether action=SessionExpired if so then redirect to the page which u want or just say window.close();
Hope it helps u??
|
|
|
|
|
Your problem has got nothing to do with the page refresh. Once after signing out if you are still able to access the secured pages then this is due to the Client-side caching enabled. you are viewing the cached page. If you want to disable it then you can write this on the code-behind. so that after the sign-out if you happen to click refresh button or back button, it should probably take you to the login page.
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Regards - J O H N -
|
|
|
|