|
Thanks for your reply. It works fine. But my DataRow contains 4 string values. For that i have used two dimensional Jagged Array and got all the values from first three rows.
For this (Jagged Array values), how can i declare a DataColumn and Bind it to the 4 diff. server controls present in my GridView.
ie. Each Column in the GridView contains 4 no of server cntrols.
I need ur valuable suggestions.. Thanks.
Regards,
Jay
|
|
|
|
|
Put an Html table in your template column. Give each table cell an id and runat="server" then. E.G.
Then use the gridviews RowDataBound event.
gvRowDB(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
DataRowView drv = (DataRowView) e.row.DataItem();
HtmlTableCell td1 =("HtmlTableCell") e.Row.FindControl("td1");
td1.innerText = drv.item["YourColum"].toString();
}
}
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
i have a button that is contain the code that call the stored procedure .
the stored procedure is execute insert sql statment and add record to
the data base that is in sql server .
when i pressed the button the record is added well and go to the database.
the problem is when i click refresh for the browser on this page
the record is added again on the database .
why & how can solve this problem ?
dead
|
|
|
|
|
What happens is when an event gets fired(postback) the event source gets stored and when you clicks on the refresh button then the event gets again fired. One simple way to get rid of the problem is to redirect to the same page after execution of the event.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thank you
this is working well
but the sqldatasource that read from database is dont work when i click refresh and i need to show the last data record inserted .
can i do this ?
dead
|
|
|
|
|
If i have understood your problem correctly then after inserting the data into the database you want to display the inserted data to the user. If this is the case then you can't directly redirect to the same page you send some value in the querystring and then in the load event of the page just check the querystring value if it is present then get the newly inserted data and display it.
Hope it will serve the purpose.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thank you for help
>>>
>>>
dead
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
First way is U control duplicate data for DB level.
Second way is U control the key event and take an action.
As U like
|
|
|
|
|
i need to write a code which would retrieve the information about the webcontrols in a webpage. i need to know the count and also what type of controls. i know that System.Reflection namespace can be used. but i do not know what class to use. can anybody help??
Sonu
|
|
|
|
|
Hi Sonu,
Sonu.T wrote: i need to know the count and also what type of controls
You can use the Controls collection of the WebForm to know the count of controls and also you can get the 'Type' objects from this collection. What for you need System.Reflection ?
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
I think Page.Controls collection will solve your problems. You can have all information about collection of web controls placed in a web page along with count.
Neeraj
|
|
|
|
|
I need to create a bunch of feedback web forms that contain pretty much the same basic controls with a few of them having a few extras and was wondering the best aproach to this.
for example: they will all have a text area and a submit button.
but a hand full need some radio buttons or check boxes, etc.
Is there some form of form inheritance I should use?
Or should i make a super form with everything on and set control visability based on a querystring or session variable, etc.
Cheers.
|
|
|
|
|
User controls are you friend. Check msdn or help files.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
To Red_Lizard_Who_Shot_The_Food
User control is what you need to add some basic controls. and you can reuse them in you aspx file.
Thanks & regards,
Suresh Dayma
|
|
|
|
|
Hi,
I’m facing this problem when I create a project by using “ASP.NET Web Application”, the error message is prompt out like this “Visual Studio .NET has detected that the specified Web server is not running ASO.NET version 1.1. You will be unable to run ASP.NET Web applications or services.” I already install the IIS in my PC, why still prompt out this error message? Can anyone of you give me some advice what should I do to solve this problem? Thanks.
|
|
|
|
|
Hi,
Do you have multiple versions of .Net FrameWork installed on machine ? If yes then the default ASP .Net engine is not set to v 1.1. Please confirm this. You can check what version of ASP .Net engine is being used from the ASP .Net tab in the default web site properties.
BTW, is IIS running ? can you access http://localhost ? Please check that IIS is running.
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Hi Anant,
I have 3 .NET Framework which are .NET Framework 1.1, .NET Framework 1.1 Hotfix(KB886903) and .NET Framework 2.0. So what should I do now? It is I need to uninstall one of the .NET Framework here? Yup, my IIS is running. Please give advance advice on this, thanks.
|
|
|
|
|
Hi,
khwo wrote: It is I need to uninstall one of the .NET Framework here?
No need to uninstall any version. Just make sure that the version you have used to develop the web app, must be the same which is currently active on the IIS. If it is not the case you may get the error again.
you can issue the aspnet_regiis command from the visual studio command prompt to know which version of asp .net engine is currently active on the IIS.
Caution : Please read the complete information about aspnet_regiis before using it.
You can get help about this on msdn. You can also change the current active asp .net engine using the same command. So you dont have to rewrite the application for the frame work version which is currently active on IIS.
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
I am quite new to using asp.net 2.0 and am only really beginning to get the hang of it, therefore i want to improve my client-side responses and to do so I have decided to add some client-side javascript to help in a calculation. I have the javascript created in a seperate file. The difficult part that i have now is trying to call this function whenever a button is clicked. So if anyone can help with some useful links/ articles on the subject please let me know.
|
|
|
|
|
First you have to include that javascript file in web page and then you can call the function of that file by adding the onclick attribute to the button.
Although what i have told here is the process do be done in asp.net 1.1 and i hope that it would be same in 2.0 also.
Best Regards,
Apurva Kaushal
|
|
|
|
|
It's still the same browser that is used on the client side, where the Javascript is, so the process is still the same, regardless of the framework version used on the server.
---
b { font-weight: normal; }
|
|
|
|
|
Ya thats true but what I thought was there can be a change in calling the javascript file or adding the attribute to the button. Anyway thanks for clarifying.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I am using a user control where i have a data grid control.
I use this user control in a page. My problem is, I have a link button for delete and when i click this button I get the confirmation message but when I click ok the record is not deleted..(The Item_Command event is not geting fired)
in the item_databount property I am adding the onClick attribute for the link button, and calling a javascript to give the confirmation message
and in the item_command event i am writing the logic for delete.
Same code is working fine for a datagrid control but itz not working when I make this datagrid as a usercontrol and draging it in a page..
Is there any property to be set for the user control
Please help...
Regards,
Sivaprasad
|
|
|
|
|