|
Quecumber256 wrote: The problem I’m having is I don’t know how to read the data stored in the first column on the GridView Control.
+ You can get reference to the first cell of a row to get the value.
+ Another option is to store the key values using the DataKeyNames[^] property and you can access the value from the DataKeys collection.
|
|
|
|
|
I didn't place a SqlDataSource Control on the web page. I think because I don't have this control on the page there are no references to the DataKeyNames and DataKeys properties.
I spent the whole day trying to find examples on how to set these properties through code. However, everything I did find required that a SqlDataSource Control be present.
My web page requires a greater amount of control than the SqlDataSource will allow.
Thank you for your help,
Quecumber256
|
|
|
|
|
Actually, you can set the DataKeyNames property either in the control definition or in code, the values should be taken from the result data reader. For example:
GridView1.DataKeyNames = new string[] { "Id" };
....
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
object key = GridView1.DataKeys[e.NewEditIndex].Value;
}
|
|
|
|
|
I'm using Visual Studio.Net 2003, Asp.Net1.1.
I have a datalist bound from a database and loaded with some Names.
I want to fire an "onClick" event when I select an element from the datalist.
How can I do that from the HTML code.
Please it's very urgent.
|
|
|
|
|
Since you have been around here for 2 years, 10 months according to your profile, I'm sure you realize posts flagged as URGENT are usually ignored.
only two letters away from being an asset
|
|
|
|
|
Never knew about that..lol
|
|
|
|
|
Hi EveryBody
Im using ASP.NET with VS 2005 and trying to make report with Microsoft Reporting Service. Those error Im getting is follows.
1.Report Viewer cant change the report. Example I got a TextBox under a Button where I can put a CustomerID in TextBox. I have put a CustomerID 1001 inside the TextBox and Clicked the Button, 1st Time Im getting the whole informations about that particular Customer. When I have changed the CustomerID like 1002 then !!! inside the code is working properly and the DataSet shows the information about that CustomerID 1002 but ReportViewer cant change the Customer Informations its remain same. Still its showing 1001 informations.
2.A data source instance has not been supplied for the data source 'DataSetAUDITLOG_CountLessons'. I have created 2 tables inside the DataSetAUDITLOG after that I have deleted CountLessons table from DataSET and Im not using this Table anymore and there is no relation with table anywhere. So why Im getting this error.
3. On the otherhand I want to send a CustomerID value to another page from a ReportViewer. Could you please tell me. How can I do it? If you have any project example about this please send me.
I need your help
Thanks
Sarfarj Ahmed
Sarfarj Ahmed
|
|
|
|
|
How can i change the page index of a datagrid from code??? I want that everytime the grid loads the default should be page1.In my code this doesn`t happen. I have created a div which acts like calendar control ie it displays currently selected month,prevmonth & nextmonth link. I show employee info i a datagrid for the selected month. The problem is with paging . Here`s the problem.
Suppose for current month i have information which is 2 grid pages long and for next month it has only 1 page. when i select page 2 in current month and clickthe nextmonth it retains its pageindex2 and thus gives an error "Page index must be >=0 and <pagecount.
Help!!!
-- modified at 8:49 Wednesday 7th February, 2007
|
|
|
|
|
Hi all ...
How to make secure login page like on-line banking ?
1. How to prevent, the same user try to open in a new window (CTRL + N) ?
2. How to prevent, the same user try to open in another client machine ?
advance thanks and i hopfully awaiting for good solution from some one
thanks & regrds
Jai
Jai Sankar N
|
|
|
|
|
Not possible. Go to an online banking page and you'll see you can do both those things easily.
|
|
|
|
|
Hi all ...
How to make secure login page like on-line banking ?
1. How to prevent, the same user try to open in a new window (CTRL + N) ?
2. How to prevent, the same user try to open in another client machine ?
advance thanks and i hopfully awaiting for good solution from some one
thanks & regrds
Jai
|
|
|
|
|
Hi,
I have been working in the Procedural language domain using VB and similar technologies.
As we know in VB, we can define functions or Sub with multiple parameters like
Private Function DisplayData(int Param1, string Param2..., int Param10)
End Function
and Call it as DisplayData(2,"stringData", ... 10)
But the prob is that we have to pass in 10 parameters in single line and there is no concept of Data Hiding.
How does ASP.NET 2.0 introduce the concept of encapsulation in here ?
How to do coding for functions / subs like these in ASP.NET 2.0 using C#.
Pls guide me.
Omkar
|
|
|
|
|
You could try looking at the 'param' keyword in C# (not sure what VB equivalent is).
This enables you to specify an unknown number of arguments as the final parameter. You need to specify the type of objects in the param collection.
See the string.Format() function for an example of where this is used.
T
|
|
|
|
|
I have a security concern with a website i'm working on, and i'm curious, how easy would it be to catch a Response.Redirect("url"), and tamper with the URL values?
Is the Response.Redirect executed under the hood? And could a simple home brewed browser function set enable that to be caught, modified, and resumed?
Cheers
T
|
|
|
|
|
I'm not entirely sure what you mean. Are you asking whether the url can be tempered with? Well yes, the user will see the url they are being redirected to and be able to change it in the address bar.
Do you mean can they intercept the Response.Redirect()? Not exactly cos thats all server-side. What the method actually does is send an HTTP 302 (I think, could be another 300 code) redirect code to the browser with the new url.
|
|
|
|
|
I actualy have a system which is a set of daisychained Response.Redirects, and i'd like to know if they can be caught and modified at each step.
By the looks of it, no. But i thought that the Response.Redirect went back to the client first, with the response.
|
|
|
|
|
Then the answer is yes, they can be caught and modified at each step. As I said, each one sends an HTTP redirect to the browser so yes it goes back to the client first, its very easy to see each one.
|
|
|
|
|
Ok, thanks. Just needed confirmation.
*sigh*
Time to write up that report.
T
|
|
|
|
|
Hai to all,
I have developed a webapplication.Presently i have declared and using variables which are used in all the application using module1.vb(ex:public i as integer,different variables for different purposes).
But this type of declaration will give a great problem in the future,in maintainace??It is true.Wats the solution for this???
Is it true that using more Session Varibles causes the application slow????
But still i am using both of them.
Give me correct idea wat i have to use for the best maintaince???
Thank in advance.
kissy
|
|
|
|
|
Hi
Don't make your application more complex ............
i think you should store all those varaibles in datacontainer class
having private variables and public properties
Populate your data to this datacontainer class and enjoy coding
|
|
|
|
|
Hai,
Thanks for ur response.But where i have to use this classcontainer,Means that class.vb???
give me clear idea about this.
Thanks once again
regards,
kissy
kissy
|
|
|
|
|
Hi Kissy
Its not difficult to create to datacontainer class. You can create in your application by adding new .vb class and write there ........
Simply you have to create one object and set all values which you required in future
|
|
|
|
|
hi gauthee,
the actual exception catched is "Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack"
regards,
chaitanya
|
|
|
|
|
Do not start a new thread. Please respond in the original thread (see the [reply] button at the bottom of each post)
|
|
|
|
|
Hi All,
I have a requirement for a user control. Below is the specification of that.
This control should be able to read a quote from a database table (sqlserver2005) and it should display the Quote on daily basis. Randomly display a quote but once display on a particular date should be repeated until all the quotes are displayed. Before changing to a different quote display, the old quote should be stamped with the date it was displayed.
Table name : DailyQuotes
Fields:-
QuoteId : integer
Quote : nvarchar(Max)
LastdisplayDate : datetime.
I am developing usiing C# and Asp.net2.0
its very urgent kindly help me.
Regards,
chitra
|
|
|
|