|
Hi i am sunil and i am in big trouble....
I am writing a asp.net with C# application and i am uploading it on webserver..
Now in my application i am using FILEUPLOAD which saves only MS WORD File..
After saving, i wanna count the Characters and Words of that word file but i dont use the Microsoft DLL..
And i having a problem over here...
So please Help me..
Its Urgent..
Sunil
|
|
|
|
|
Hi after or before saving this file just open this file using streamreader or like that class(File handling). then make it single string then its easy by String.substring() method.
|
|
|
|
|
I'm having a problem which I thought would be a very simple thing but is
> > turning out to be a difficult challenge. I have a web form with several input
> > fields and I have a single checkbox, not a checkbox list. Before the form can
> > be submitted I want to require that the checkbox be checked. Sounds simple
> > but non of the validation controls seem to work correct for this, or maybe
> > I'm just not using them correctly. I have done several searches but I can't
> > seem to find any examples of this type of thing being done. Which is very
> > surprising because this sort of checkbox is a very common thing. i.e. "I
> > agree to the terms....." Can anyone point me to an example? I'm using ASP.NET
> > 2.0
Thanks
seema
|
|
|
|
|
Seema,
No one can help you unless see your code....So please post your code!! In the meantime you can look into...
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CheckBox ID="ChkName" runat="server" Text="Email Require" />
<asp:Button ID="btnSubmit" runat="server" Text="Click Me" />
</div>
</form>
</body>
</html>
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
If Me.ChkName.Checked = True Then
Response.Write("Selected")
Else
Response.Write("Not Selected")
End If
End Sub
Thanks!!
-- modified at 15:06 Wednesday 19th September, 2007
Amit Gugnani
|
|
|
|
|
Hi all....
I've a DataGrid dat have 15 columns to display. It becomes so large dat it does'nt fit on de page.I want to do horizontal scrolling in DataGrid.Is it possible??
if ny1 know abt it kindly do tell me or some other way to apply horizontal scrolling in DataGrid.
Thanks in advance
|
|
|
|
|
There isn't any built scrolling properites but you may declare your datagrid within a div tag. Set the hight and width and there is a div scroll property.
<your grid="">
|
|
|
|
|
Hi Friends,
I am using Asp.net menu bound to a xml file. menu item shows up to 5 levels of menu.
My problem is I want to show menu hierarchy on top of the page.
like we do using sitempapath while using web.sitemap as data source.
Can any one hlep me how I can show
sitemappath when I am using xml as data source.
|
|
|
|
|
Hi
I want to implement forum in my project.Can i use wordpress (which
is availalbe with php) with my asp.net application.
Thanks.
Rahul.
|
|
|
|
|
Hi All,
i want to change datafield property of a gridview column from code behind (column is a bound field). below is my gridview, here i want to change datafield of second column from "ClientNumber" to "ProductNumber" based on some user action on the page. how can i achieve it from code behind(<b>C#</b>)
<code>
<asp:GridView ID="grdSR" runat="server" AutoGenerateColumns="False" BackColor="InactiveCaptionText" Visible="true">
<Columns>
<asp:TemplateField HeaderText="Add">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<HeaderStyle HorizontalAlign="Justify" VerticalAlign="Top" />
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" /></ItemTemplate></asp:TemplateField>
<asp:BoundField DataField="ClientNumber" HeaderText="ClientNumber">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<HeaderStyle HorizontalAlign="Justify" VerticalAlign="Top" /></asp:BoundField>
<asp:BoundField DataField="ClientName" HeaderText="ClientName">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<HeaderStyle HorizontalAlign="Justify" VerticalAlign="Top" />
</asp:BoundField>
</Columns>
<HeaderStyle BackColor="#2A76B2" ForeColor="White" />
<AlternatingRowStyle BackColor="White" BorderColor="Gainsboro" BorderStyle="Solid" /></asp:GridView>
</code>
does anyone have any idea about this?
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
-- modified at 10:52 Wednesday 19th September, 2007
|
|
|
|
|
Try something like this:
<br />
((HyperLinkColumn)grdSR.Columns[X]).DataField = "NewDataField";<br />
Where X is the index of the column you want to edit
|
|
|
|
|
Hi All,
My problem is when inserting data into database(Perfomance issue) line by line. Is their any tecnic like in a single hit to database can insert all the data atatime and update in database.
Thanks,
Priya.
Priya
|
|
|
|
|
hi can some one give the simple answer what is impersonation
i am not getting correct information , would appreciate if someone gives a good answer
Thanks
sri
|
|
|
|
|
Hi,
basically impersonation is a means for a particular process account to access a given ressource on behalf of some other process accounts. Simply speaking, say i am a user process and i have access to some local resources on my computer. You are another process which does not have access to local resources on my pc. If you really need to access these local resources, i can give you access by letting you "impersonate" me (i.e temporarily take my identity).
This often occurs in ASP.NET where the account IUSR_YOUR_MACHINE_NAME is required to execute some resources to which it does not have rights. In this case, you have to give ASP.NET the right to impersonate another account (say admin account for example) to do the job.
Eg. If you need to save a file on the server and the account IUSR_YOUR_MACHINE_NAME does not have enough rights to do it, it is a common practice to allow ASP.NET to temporarily take the identity of another account to perform the job.
This is how it can be done in the web.config file:
< identity impersonate="true" userName="MyDomain\Admin" password="admin"/>
Hope this helps
Carpe diem,
Krg
|
|
|
|
|
Hi all,
I have a link button on my aspx page, and also a Details View control.
When the user clicks on the link button, we want to get the currently displaying values from the fields in the Detailsview and send out as email.
We already have a sendNotification function to handle the sending of emails.
Are there any properties of the detailsview that will give us the values of the currently displaying fields?
ie using vb.net:
Protected Sub lnkSendMail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkSendMail.Click
SendNotification( DetailsView1.[property or properties combinations].ToString(), [sender], [Recipient], [subject] )
End Sub
Thanks!
|
|
|
|
|
I need code in C# to populate checkbox in gridview to delete records.
Please help.
Thank you
Saranya
|
|
|
|
|
Hi!
I am asuming that you have placed check box in your grid. You have a delete button in your page. When you click on that button, it will delete all records for which the check boxes were checked.
If you have a different scenario then plz let me know.
You can use the following code in the onclick event of that button.
protected void btnDelete_Click(object sender, ImageClickEventArgs e)
{
string strUserId = "";
foreach (GridViewRow gv in gvUsersToDelete.Rows) //traverse thru each row of the grid
{
//chkDelete is the name of the checkbox you placed in the grid. We first find that checkbox from the current gridview row and get it in a local checkbox type object, cb.
CheckBox cb = (CheckBox)gv.FindControl("chkDelete");
if (cb.Checked == true) // now check if the check box in this row is checked or not
{
// our grid had User ID in its column 0. So we are getting the userid from the 0th column in the //current row.
strUserId = gv.Cells[0].Text;
DeleteThisUser(strUserId); // passing userid to DeleteThisUser function.
}
}
}
private void DeleteThisUser(String strUserId)
{
// code to delete the matching strUserId.
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
Hi,
Friends, I am in a big problem can anybody please help me...
I am using asp.net c#,NHibernate and asp.net ajax also...the problem is that for example i want to update something into database,in case some error will happened in the midst of updation i want to show my own error message like "Error is happened please try next time" instead of system error...i tried using try catch block but it shows system error message in that...how will i solve this...remember the button and other controls are placed in ajax updatepanel..
please help me..
regards
alex.
|
|
|
|
|
You can't use a message box in an ASP.NET application. How do you catch the exception, and how do you want to show the error message?
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
What i want is i want to show a javascript alert message in catch block in try catch...
i am using asp.net ajax also....
regards
alex.
|
|
|
|
|
Try to use this:
IdOfYourScriptManagerObject.RegisterStartupScript(this,this.GetType(),"Msg","alert('Error message');",true);
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I'm using the .NET 2.0 Membership provider. I have a gridview that displays the user names. But I want to display more info for each user like last login date, if he/she is locked out, etc. I'm not exactly sure how to do this because System.Web.Security.Membership.GetAllUsers doesn't have these methods, but MembershipUser does. I do not know how to do this so it displays this extra info for each user.
Please can someone advise?
Regards
|
|
|
|
|
GetAllUsers returns a collection of MembershipUsers. So what is the issue?
only two letters away from being an asset
|
|
|
|
|
hi
i have got Below Error When i down load file from any site and my Application is Continue Debug More time then I got following Error .
if any one has solution then please help me.
"may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during running operations."
thank
in Advance
saniya k v
|
|
|
|
|
Download the file in a separate thread. If you do it in the main thread, it won't be able to respond to any events while the download is going on, which will make your application look like it's stuck.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi
i used Windows Application and All Processed done in Single thred
first i download file and then i Insert data from that file to in SQL Table
saniya k v.
|
|
|
|