|
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.
|
|
|
|
|
Hi All,
I have to show some data into DataGrid. Now there is one Button, On click of that Button this DataGrid should be converted into PDF format and mail this PDF file. Is it possible?? I have tried some 3rd party component to do so. But I cant get the result.
I have successfully added one DataTable into PDF format. But not a dynamic DataGrid..
Plz help me, if anyone have some idea about this......
Thank you
Keep Smiling...........
|
|
|
|
|
Before converting into PDF, Rebind Datagrid or any dynamically created cotnrol.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi Mr.Pathan ,
can u plz explain it briefly.
Thank you for reply.
Regards
|
|
|
|
|
On button click event,First call method to rebind gridview and after that convert into PDF File.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hello Mr.Pathan,
Thanks for reply again.
But I have only method from which I can only convert DataTable to PDF format, not DataGrid. So can you plz give me solution into that direction
Regards
|
|
|
|
|
how can i create an image of a web page by either web or windows application.
example, www.yahoo.com is the url.
i want to create an image of this url.
Regards,
Kapil Thakur
(Where's there is Kapil , there is a way) - thakur.kapil@gmail.com
|
|
|
|
|
The quickest way i see is to programmatically navigate to the URL and programatically perform a printscreen and save the clipboard data to to file.
Dunno if this is of any help.
Carpe diem,
Krg
|
|
|
|