|
|
for (int i=0; i<checkboxlist1.Items.Count; i++)
{
if (checkboxlist1.Items[i].Selected)
{
checkboxlist1.Items[i].Text
}
}
u will get each item selected
|
|
|
|
|
Hello,
I put an ImageButton field on my GridView.I want this:
when I clicked on the ImageButton,
value of that row's ID field must returned that is selected with ImageButton . (I know my english is awful )
ImageButton code:
<ItemTemplate>
<asp:ImageButton runat="server" id="IMG1" ImageUrl='My URL' />
</ItemTemplate>
Thnaks in advance
|
|
|
|
|
Try to trap Index from RowCommand event of GridView
|
|
|
|
|
What do I write in RowCommand event ?
|
|
|
|
|
|
You can code like this inside Row_Command event
int row_index = int.parse(e.CommandArgument.ToString())
Now row_index will have row index (which row's button u have clicked)
Now u can access any value
string abc = grd1.rows[row_index].cells[2].text.tostring()
By:
Hemant Thaker
|
|
|
|
|
CommandArgument=<%#Container.DisplayIndex + 1 %>
give this in image button and get the
index by using this
int.Parse(e.CommandArgument.ToString())
|
|
|
|
|
Hi...
I m using master page for my website(asp.net/C# 2.0) and have put adrotator control.
I am using Ajax Update Panel and put adrotator and timer control under it, alogwith scriptmanager.
I am displaying GIF images through xml file into rotator.
Now once the first page of the website is loaded everything works fine, but once i redirected to different pate what i see is page is automatically posting back though i have put rotator in update panel.
(i have put scriptmanager in master page only)
Please guide me to execute AdRotator for smoothly running...
thanks
By:
Hemant Thaker
|
|
|
|
|
Hi all,
I have been searching for Ajax implementation in ASP .net,
I want to call a server side method from Javascript, but I am not able to find an example of that.
I don't want to use a webservice or webmethod.
Please provide with some links where i can get a proper implementaion of AJAX in ASP .Net.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
|
I dont want to call a webservice method.
I want to call a Code behind method of the page.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Check out the following article[^]. I hope this would help you. Let me know if you need any further details.
|
|
|
|
|
|
sekannak wrote: I am new to COM Components. If any sample code or Sample program available for COM object, please upload over here...
How does it is related to ASP.Net?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi all,
I m trying to upload file on sever through upload control. code is working fine in local environment. also i have test code in asp. But when i have deployed the same asp.net code on server, getting this error....
Access to the path 'e:\Inetpub\herddealers.com\wwwroot\admin\resources\Book1.xls' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'e:\Inetpub\xyz.com\wwwroot\admin\resources\Book1.xls' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
code in asp to upload file in same folder is working fine but not in asp.net.
can any 1 know the reason...
plz help me to resolve this issue...
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Jain Vijay wrote: I m trying to upload file on sever through upload control. code is working fine in local environment. also i have test code in asp. But when i have deployed the same asp.net code on server, getting this error....
Vijay,
This is the problem with Access permissions on web server. Let me discussed it in details.
Why it was working on Local Environment ?
Becuase, In VS, you application is running by ASP.NET Engine , which having the all rights to write data on your system, so its working fine on Local Enviroment.
Why not in Hosted Server ?
Web Appliction runs on server with some limited permission for security reasons and user does not have the suficient permission to write data on Folder. So you are getting the Error.
Resolution :
1. Give the Full Access rights to all the user on the folder where you are storing the file.
2. Create a Separate Application Pool on Web server, Change the Identity of Application pool to "Local System " ( Which having the maximum permissions) .
And assigned it to your virtual directory.
Hope this details explained will help you
|
|
|
|
|
Hi Abhijit,
thnx for your reply. Further, on folder full access is already given. Also i am able to upload file in same folder from ASP application. but not be able from asp.net application.
My server is shared server and i have no permission to create application pool.
Is there any other way to set this issue?
Thanx...
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Jain Vijay wrote: on folder full access is already given.
To whom ? Is it given to every one?
|
|
|
|
|
Hi Abhijit,
Problem is resolved.
In web.config file, under <system.web>
<identity impersonate="true">
tag was needed. After add this tag, now code is working fine on server.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Jain Vijay wrote: Problem is resolved.
Great Vijay !!
Please share us the web.config block. Which may helps others. In you post its not showing,
Please Checked the Do not interpret HTML tags (good for code snippets) checbox before post.
|
|
|
|
|
Hi Abhijit,
here is s web.config block...
<system.web>
<identity impersonate="true"/>
</system.web>
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Hi everybody,
a webservice web method is called from window service to update a database table.there is a huge amount of data is
inserted or updated into database but i get exception on service on try catch block "The underlying connection was closed: An
unexpected error occurred on a receive".i don't know what is roung.i am using window server 2003 and dotnet 1.1.also i don't
want to use any iis settings to remove this bug
|
|
|
|
|
If you are transfering large messages or the operation on the service side is taking very long you may enter into a timeout situation that you can change in ASP.NET configuration.
To do so, follow these steps:
1.) Click Start, and then click Control Panel.
2.) Double-click Administrative Tools, and then double-click Internet Information Services Manager.
3.) Expand Web Sites, right-click Default Web Site (or the site where your MCMS Web application is installed), and then click Properties.
4.) Click the Web Site tab.
5.) In the Connections section, in the Connection timeout box, increase the seconds to a value that is sufficient for the length of the import.
6.) Click OK.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi Manas.
i don't want to change any iis setting.is any another way to sortout this bug.
|
|
|
|