|
We cannot tell without seeing your code, why it is not firing?
SSK.
|
|
|
|
|
*****************for prompting message box*****************
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
ImageButton img = new ImageButton();
img = (ImageButton)e.Row.FindControl("imgdelete");
img.Attributes.Add("onclick", "javascript:return " +
"confirm('Are you sure you want to delete this record " + DataBinder.Eval(e.Row.DataItem,"propertyid") + "')");
}
***********delete row after click on ok of prompt window***********
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
if (GridView1.Rows.Count > 0)
{
string s = GridView1.DataKeys[e.RowIndex].Value.ToString();
SqlCommand cmd = new SqlCommand("delete from property_info where propertyid=@propertyid", conn);
cmd.Parameters.Add("@propertyid", SqlDbType.Int).Value = s;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
int s=Convert.ToInt32(e.CommandArgument);
SqlCommand cmd = new SqlCommand("delete from property_info where propertyid=@propertyid", conn);
cmd.Parameters.Add("@propertyid", SqlDbType.Int).Value = s;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
}
|
|
|
|
|
hi
You Bind GirdView every Time or In IspostBack Event..
try with
bind girdview in PageLoad event Like this
if(!IsPostBack)
{
bindgrid();
}
may be ur problem solve
Jintal Patel
|
|
|
|
|
ya i have caught this problem, anyways thax alot for helping.
|
|
|
|
|
hi,i am display image in gridview but when i click a image button error display,
//**********************error*******************
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %>in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation
//***********************************************
how to solve the problem.if u know the answer replay soon
modified on Saturday, February 16, 2008 4:40 AM
|
|
|
|
|
Hi,
I want my application to automatically read the unread email from mailbox and store the content i.e sender, subject and body of the mail etc in the database.
I don want to restrict my application to read mails only in the outlook.
Is is possible to do this using ASP.NET. If yes then please tell me how to go ahead with this.
Thanks a lot!
|
|
|
|
|
|
Hi - there are loads and loads and loads more articles on CodeProject which show this. Do a search!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
How can i fetch a row of values from dataset, I Prefer to the row type, the one that created by dataset.
What is a advantage and Disadvantage of Dataset and DataReader?
|
|
|
|
|
Saksida Bojan wrote: What is a advantage and Disadvantage of Dataset and DataReader?
"As with many developer decisions, there is no clear-cut choice between using a DataSet or a DataReader."
Hmmm....in my own thinking, it seems clear that DataSets+DataAdapters are a better choice for smaller projects where:
* The development time can be considerably shortened by avoiding creating business object classes and using the nice relaitonal/table-like features of the DataSet
* The underlying tables are very simple, which again ties in with the RAD aspect of DataSets since you can rely on auto-generated Update-, Delete-, and InsertCommands.
On the other hand, when working on larger object oriented systems, a DataReader will generally always perform better than a DataSet. Using try-catch-finally/using (C# only) (like a any good developer), you can always ensure that if there is an error, you close the underlying connection. You also get more flexibility in how your object relationships are represented, but at the cost of having to build those relationships manually.
So it seems pretty clear-cut to me. DataSets are great for RAD and if your application deals with the underlying data in a table-like manner (typed-DataSets abstracts this somewhat into a more object oriented manner). If you want the best performance and most flexibility, DataReaders+custom business objects are the way to go.
SSK.
|
|
|
|
|
If my project voud require more performece, i will update it to DataReader.
It woud be easier to change from DataSet to DataReader once you have all tables.
And what about this question.
How can i fetch a row of values from dataset, I Prefer to the row type, the one that created by dataset?
|
|
|
|
|
Hi,
I need to add entries (key and values) to a EXISTING resource file (resx) programmatically. Can anyone plz help me on this?
Thanks
Carpe diem,
Krg
|
|
|
|
|
Hi to all,
I want to implement blog and forum in my project.
Is there any open source available which in written in asp.net and
vb.net through which i can implement blog in my project.Please
tell me if there any opensource software available and how can
i use it in my project?
Thanks.
Rahul
Rahul.
|
|
|
|
|
rahul.net11 wrote: I want to implement blog and forum in my project.
Is there any open source available which in written in asp.net and
vb.net through which i can implement blog in my project.Please
tell me if there any opensource software available and how can
i use it in my project?
Yes. You might want to look at SubText - I don't know what language it is written in though.
There are also blog and forum modules for DotNetNuke which is open source, so you might want to look at that - They are written in VB.NET to my knowledge.
|
|
|
|
|
Thanx
I seen SubTex but it is written in C# and it support asp.net 2.0 and
same as DotNetNuke. I need an opensource software which is written in
vb.net and support to qwp.net 1.1. Is there any?
Thanks.
Rahul.
|
|
|
|
|
A quick search through google and I found this[^] one.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanx
I download the code but the code dosenot contain solution file
Without solution file how can i run the code? I think vb.net code
is in vb.net 2.0.
Thanks.
-- modified at 8:56 Thursday 20th September, 2007
Rahul.
|
|
|
|
|
rahul.net11 wrote: I seen SubTex but it is written in C# and it support asp.net 2.0 and
same as DotNetNuke.
Both have .NET 1.1 equivalents which may not be as advanced as the current .NET 2.0 version.
Why is VB.NET so important?
|
|
|
|
|
|
Hi All,
I have being given an assignment where I have a TreeView inside GridView Control. I want to show GridView control having parent child relation ,show in the form of Treeview.
Somewhat shown in this link:
http://www.treegrid.com/TreeGrid5_0/Html/EJSTreeGrid.html
How to do this???
Thanks in advance...
|
|
|
|
|
Hi
You can also achieve this by taking GridView inside Gridview.
Take One DIV tag in gridview and another GridView in DIV tag.
Take One Image button in Parent gridview and call javascript to make visible true or false to DIV tag on click of this Image Button.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hi Imran,
Thanks for the reply but my requirement is to use treeview control only. Can u please help me with it???
Thanks again...
|
|
|
|
|
Any luck.. Pls mail me if you have any articles.. Thanks..
|
|
|
|
|
|
Hi there,
i have a function which store value of document path, in my web application i have two path for example
1. path one domainname\jp\xyz
2. path two domainname\sg\xyz
the application able to get the location path of number 2 and it function is use to delete that path folder. when the user from the jp domain try the function thro error the document path cannot found?
how can i assist the string a dynamic value? since it taken value from web config
<add key="SG_PostFolder" value="D:\DMStest\Post\">
<add key="JP_PostFolder" value="D:\DMSTest\Post\">
This is the function
public string GetPostLocation(string strDocumentNumber)
{
int intTypeLength =0 ;
string strPostLocation = string.Empty;
try
{
if(strDocumentNumber.Trim().Length == 16)
intTypeLength =1;
else if(strDocumentNumber.Trim().Length == 17)
intTypeLength = 2;
strPostLocation = _postFolder;
}
catch(Exception ex)
{
throw ex;
}
return strPostLocation;
}
any suggestion please
regards
Ybasha
|
|
|
|