|
IMHO, you might want to check out a couple of things:
+ Use Webdav to manage/edit the files.
+ Show the file contents at the client side in the Excel-like display, here you can might want to look for some custom grid controls supporting Excel-like style, then the client can edit in the web page and finally submit the changes to the server.
+ You can allow the user to open the Excel file on their box with the Excel application, then you can use an Excel add-in to capture the Save action to send the edited file to the server.
|
|
|
|
|
Is there any form generator or template to create search forms? I just want to display data from my sql server 2005 tables using drop down menu or search field. I'll greatly appreciate any help.
|
|
|
|
|
Hi Guys/Gals,
I have a template field called "Details"(A button field) for each row in the Gridview control.
How do i know at which row/index the "Details" button is clicked? Because I cannot use SelectedIndex/ SelectedRow when "Details" button is directly clicked?
I would really appreciate it if anyone could help me in this matter?
Thanks,
Murthy here
|
|
|
|
|
Try to find e.row.rowindex on row editing if u want to edit that row.
|
|
|
|
|
Actually what it does is it redirects the page to the details of the particular row. so they are not actually editing that row. they are not even selecting but they are going to click the button directly.
thanks,
Murthy here
|
|
|
|
|
Did you try Itemcommand??
Gautham
|
|
|
|
|
no i do not know anything about itemcommand. can u please elaborate that please?
and how do i use e.row.rowindex command?
thanks a lot,
Murthy here
|
|
|
|
|
Hi,
I want to check if an item read from a database exists in the combobox before I add it to the combobox, so that the item is not repeated in the combox. For example I want to check for the reader["Area"] doesn't exist in "comboArea", if it doesn't exist, then add it to the combobox.
how can I translate that in C# language??
I'm not sure how it's written.
If anybody has anybody has any idea how to do this, plz send it.
|
|
|
|
|
You're adding items from the DB on postback, but not clearing it ? I think the comboBox.Items property lets you check if an item is there, you'd have to add them on at a time, but you must be doing that already.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi
While populating the combobox,you can add both text and value like,
Fill the fieldname to be populated along with any unique field to distinguish the items(say same name for 2 persons but different EmpID exist in db) in a datatable(dt).
Then,
<br />
ComboBox1.DataSource = dt.DefaultView;<br />
ComboBox1.DataTextField = "fieldname";<br />
ComboBox1.DataValueField = "same or any unique field name to distinguish text field";
ComboBox1.DataBind();<br />
Then you can check the item's existence as,(in the method where you again populate)
<br />
ListItem item = ComboBox1.Items.FindByValue(dt2.Rows[0]["UniqueFieldName"].ToString());<br />
if(item==null)<br />
ComboBox1.Items.Add(new ListItem(dt2.Rows[0]["FieldName"].ToString(),dt2.Rows[0]["UniqueFieldName"].ToString()));<br />
else<br />
Hope this piece will help you.
Let me know if you have any issues over this
~VSree
|
|
|
|
|
Hi
I am confused regarding the statement All Web controls must be placed within a tag to function properly. I have added the following to a webform
<asp:literal id="Literal1" runat="server">
in the code behind I have the following Literal1.Text = "Hello World";
I do not have the web contorl within tag so how come it works.
I have also found that I can place other web controls on a web page and not have them between a tag and they work fine.
I would appreciate it if some one can explain this to me
Kind Regards
|
|
|
|
|
Hi,
It also confused me initially.
But what I found is that, only those web controls which needs a form tag to function are needed to be placed inside a form with Runat="server" attribute. I mean to say, when a form is submitted the value of the controls which will be posted back are of the above type. Thus textbox need to placed inside a form with runat="server" but for a label it is not mandatory.
I hope this answers your question.
Thanks,
Pradipta Basu
|
|
|
|
|
Only the controls that are rendered as form fields in the html code need to be inside the form to work.
The reason they do is that when the form is posted, only the data from the fields that are within the form is included in the request.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai,
i am using asp.net1.1, i Want to implement ajax controls .Any freely downloadable ajaxcontrol toolkit is available?
Thanks and regards,
surendra
|
|
|
|
|
AJAX is not that hard. I'm sure there are toolkits ( google for it ), but with a good book, you shouldn't need them, unless you're just hoping to get a bunch of stuff for free ). Thre's no reason I Can see for the MS toolkit to not work in 1.1, apart from politics.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i have downloaded microsoft Asp.netajax controlToolkit,but inorder to use i have to run the solution file in vs.net2005,but i am using vs.net2003,
please send some more possibilities ,if u know
Thanks for ur reply
surendra
|
|
|
|
|
I knew that, I said there is no reason, bar politics. In other words, it doesn't work because they don't want it to, but there's no reason you can't find other toolkits on the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I've been spending numerous hours on this project and haven't been able to find a solution or anything close to my problem on the internet or this site.
The Project: Integrate VBScript into an HTML page to allow for reading registry keys.
Working Parts?: So far I believe I've coded the VBScript correctly to read the registry and store "Description" value into Card1. The next thing I'm trying to do is use a HTML drop down menu that updates the menu from information read in the registry.
The Code:
<title>Drop-down Network Card Menu
Choose Network Card
Card1
cNICCard1
Any help would be fabulous
If I get it figured out by myself I'll be sure to update this post for ya'all.
|
|
|
|
|
Greetings to you!
I think I've found a bug but not sure. So would like to hear your opinion on this issue.
It happens when I try to use Response.Cache.AddValicationCallback method in ASP.NET 2.0.
It seems that when using HttpValidationStatus.IgnoreThisRequest option the cached page is actually invalidated
and the most recent version is cached. Not sure if it's a bug or the intended behaviour in ASP.NET 2.0.
As written in MSDN documentation for the IgnoreThisRequest option (HttpValidationStatus enum):
"IgnoreThisRequest - Indicates that the request is treated as a cache miss and the page is executed. The cache is not invalidated. "
To try this I used simple test.aspx page with the following directive
<%@ outputcache duration="1200" location="server" varybyparam="none" %>
the page itself has a current time code only : current time is: <%= DateTime.Now %>
in the code-behind file I have implemented validaton callback:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Caching;
public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.AddValidationCallback(new HttpCacheValidateHandler(DoCallback), null);
}
public static void DoCallback(HttpContext context, object data, ref HttpValidationStatus status)
{
if (context.Request.QueryString["d"] == "true")
status = HttpValidationStatus.IgnoreThisRequest;
else
status = HttpValidationStatus.Valid;
}
}I hit the page a couple of times to make sure it is cached, then I add querystring parameter "?d=true" and it all seems fine so far, every time fresh page is executed.
But then, when I remove querystring parameter and hit the page, not the previously cached page but the page with the most recent time is displayed and cached as well.
Do you think it's correct??? What's your opinion on this?
|
|
|
|
|
I have Created 2 Tables inside the DataSetAUDITLOG
1. AuditLog
2. CountLessons
I have deleted the table CountLessons from DataSet and Report and I am not using CountLessons table anymore. As before I got the Same Problem, On that time I deleted the DataSet and .aspx and .rdlc
Thanks
Sarfarj Ahmed
|
|
|
|
|
I am exploring the DataGrid and DetailsView functionality in 2005. This is the WalkThrough I used:
http://msdn2.microsoft.com/en-us/library/stc0szde(VS.80).aspx[^]
I got a question for the DetailsView field that was filled from datasource, is there anyway I can set it to a drop down list so that when people wants to update, they can select from drop down list instead of key in the value?
|
|
|
|
|
hi there...
are you making the fields as template fields? if no, convert them into template fields from the smart tag of the detailsview and then in the edit template of the particular field, replace it with an asp:dropdownlist control with the required list items/ sqldatasource.
hope this helps...
Murthy here
|
|
|
|
|
Thanks Murthy!
I tried this and it worked. But I got a new problem of how to set the selected value in this drop down list when I want to update it.
I appreciate any answer.
|
|
|
|
|
Hi there,
Can you post your gridview code for that particular template field?and the sqldatasource?
thanks,
Murthy here
|
|
|
|
|
Hi Muthy,
The template is actually in Detail View. By select a value in Grid View, a Detail View will show up and in the Detail View, you can add/update/delete records. So I changed the UpdateParameter and InsertParameter in the Detail view like below but got this exception:
'ddlProgress' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Here is the code for the update parameter and datasource:
***************************************************************************
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:cs1%>"<br />
UpdateCommand="spUpdReport" UpdateCommandType="StoredProcedure"><br />
<UpdateParameters><br />
<asp:ControlParameter ControlID="GridView1" Name="StatusActivityID" PropertyName="SelectedValue"<br />
Type="Int32" /><br />
<asp:ControlParameter ControlID="DetailsView1$ddlProgress" Name="ProgressID" PropertyName="SelectedValue" /><br />
<asp:Parameter Name="StatusActivityID" Type="Decimal" /><br />
<asp:Parameter Name="DateEntered" Type="DateTime" /><br />
<asp:Parameter Name="ProjectName" Type="String" /><br />
<asp:Parameter Name="ProjectDescription" Type="String" /><br />
<asp:Parameter Name="WaitingOn" Type="String" /><br />
<asp:Parameter Name="DueDate" Type="DateTime" /><br />
<asp:Parameter Name="ExpectedCompletionDate" Type="DateTime" /><br />
<asp:Parameter Name="ActualCompletionDate" Type="DateTime" /><br />
<asp:Parameter Name="Priority" Type="Decimal" /><br />
<asp:Parameter Name="UpdatorID" Type="String" /><br />
<asp:Parameter Name="DivisionID" Type="Decimal" ConvertEmptyStringToNull="False" /><br />
</UpdateParameters><br />
</asp:SqlDataSource><br />
<br />
***************************************************************************<br />
and here is the template and datasource for the Progress(which I want to use a drop down list to display, ProgressID is the value and Progress is the name for the drop down list)<br />
<br />
<asp:TemplateField HeaderText="Progress" SortExpression="Progress"><br />
<EditItemTemplate><br />
<asp:DropDownList ID="ddlProgress" runat="server" DataSourceID="SqlDataSource3" DataTextField="Progress" DataValueField="ProgressID" SelectedValue='<%#Bind("Progress")%>'><br />
</asp:DropDownList><br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$connectionStrings:cs1 %>"<br />
SelectCommand="SELECT [ProgressID], [Progress] FROM [Progress]"></asp:SqlDataSource><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Progress") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<br />
*****************************************************************************
Thank you so much for your help!
Alex
<
-- modified at 11:49 Friday 11th May, 2007
|
|
|
|