|
hi Brij,
can u send example or links to refer how to use XMLHTTPRequest without using update panels ...
any site to refer...
Ashok
|
|
|
|
|
Please find below
http://www.xul.fr/en-xml-ajax.html[^]">
http://www.w3schools.com/Ajax/Default.Asp[^]">
For more you can get a lot from google
Cheers!!
Brij
|
|
|
|
|
Hi,
I am receiving "Unspecified HTTP error.." when i am trying to connect to my server thru my applicaton. I have VC++ MDI appplication and not ASP application. I would like to know if you have come across such error. I have SOAP tool kit 3.0 installed. How to resolve it?
Thanks
SNI
jhghjghj
|
|
|
|
|
Hi ,
I am trying to developping a web application where i want to implement silent remote instalation.
That means if click a link then the .exe file located at server will be automatically get installed to the client machine.
Normally when ever we are installing any software we are comming across a popup showing next,previous,finish buttons.
But in my application needs automatic installtion without dispaly of that popup.
Can anybody help me.
Thanks in advance.
subrat
|
|
|
|
|
To run an .exe file on client side without informing the user / os is similar to any virus activity.
Normally the client browsers + OS sense the .exe files trying to execute and blocks it asking user either to go ahead or not.
Programmers who have tried infecting client computers may help you but this is not good.
|
|
|
|
|
Hi,
This is my first question posted here so please go easy on me
I've been searching around and trying all sorts of things to solve this problem but still no luck...
after I bind the data to the wanted GridView, I can not address a specific column that I want to set to visible = false.
I keep getting this error: "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index". Debugging shows that Grid has data and it is not empty, so I do not see a reason for this to happen.
here is an example code and the stack trace:
private void GetUpdated()
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt = myData.RetrieveData("db_GetCaseLastUpdate").Tables[0];
dt.Columns.Remove("IncidentId");
dt.Columns[1].ColumnName = "Last Modified";
grid_Update.DataSource = dt;
grid_Update.DataBind();
grid_Update.Columns[0].Visible = false; <-- sorce error
}
Stack Trace:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +2880797
System.Web.UI.StateManagedCollection.System.Collections.IList.get_Item(Int32 index) +9
System.Web.UI.WebControls.DataControlFieldCollection.get_Item(Int32 index) +5
_Default.GetUpdated() in c:\Documents and Settings\customerservices\My Documents\Visual Studio 2005\WebSites\AjaxControlToolkitWebSite1\Default.aspx.cs:81
_Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\customerservices\My Documents\Visual Studio 2005\WebSites\AjaxControlToolkitWebSite1\Default.aspx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Also, I can't seem to find a way to change a column's width.
I hope this is the right forum for this question...
TIA for your help!!!
|
|
|
|
|
follow the below:
1.
for (int index = 0; index < this.grid_Update.Columns.Count; index++)
{
if (this.grid_Update.Columns[index].HeaderText == "SomeHeader")
this.grid_Update.Columns[index].Visible = false;
}
2. "SomeHeader" is nothing but the column header.
Regards n Thks
Sam.M
|
|
|
|
|
Thanks Sam, for the quick and effective reply!!!
|
|
|
|
|
You're most welcome.
Regards n Thks
Sam.M
|
|
|
|
|
Is there any page unload event in asp. I need to remove some session information when i closing the page. Please help me how to do this.
Dushan Perera
|
|
|
|
|
Dushan:
No events are fired when browser is closed. Handle the JS event when browser closes and send AJAX call to server which should call a method and clears the necessary sessions.
|
|
|
|
|
I am new to asp. I want to ask very simple question. If i declare page level non static private variable the data in that variable is unique to that session(user).
Dushan Perera
|
|
|
|
|
|
if you create a page level variable then it won't be accessible from other pages.It will for that user for that page only
Cheers!!
Brij
|
|
|
|
|
It's unique for that instance of the page class, i.e. you get a new variable every time there is a request for the page. You can't use the variable to keep data from one page request to another.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
VB CODE:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim tr As New TableRow
Dim tc As New TableCell
tc.Controls.Add(New TextBox())
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tr As New TableRow
Dim tc As New TableCell
tc.Controls.Add(New TextBox())
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
ListBox1.Items.Add("makarena")
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Label1.Text = Table1.Rows.Count
Label2.Text = ListBox1.Items.Count
End Sub
HTML CODE:
<body>
<form id="form1" runat="server">
<div>
<asp:Table ID="Table1" runat="server">
</asp:Table><br>
<asp:ListBox ID="ListBox1" runat="server"></asp:ListBox><br>
<asp:Button ID="Button1" runat="server" Text="Button1" /><br>
<asp:Button ID="Button2" runat="server" Text="Button2" /><br>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br>
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label></div>
</form>
</body>
I made a test page-code - please help to understand why it is working the way it is working....if I click on button1 table1 will get 1 extra textbox, no matter how many times I click after that it will be still 2 textboxes and once I click button2 table1 one will appear with only one textbox again, but with listbox items everything working as I wanted (button1 add items and button2 count them)
|
|
|
|
|
ASP.NET won't maintain viewstate for dynamically created controls. Dynamic controls has to be created on each request. Best place to create dynamic controls is OnInit method.
Alternatively, you can put the textbox in a template column in a gridview/datagrid. When the button is clicked, add a new row to the gridview's datasource and rebind the grid. So the newly added row will have the texbox and it's details will be kept in viewstate by ASP.NET along with the parent control (gridview).
|
|
|
|
|
i m trying to select ,update,insert,delete data using detailsview control. i get error: too many parameters for proc or func..
the params in the sqldatasource are exactly the same as those on the stored proc (6)
|
|
|
|
|
i want to know the complete code of session in ASP.Net.Actually i have to transfer a huge data from one page to another in my site.I will be thank full to u people
|
|
|
|
|
bsse wrote: want to know the complete code of session in ASP.Net
Please elaborate a bit more clearly. Do you mean session variables and that type of thing?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
bsse wrote: i want to know the complete code of session in ASP.Net.
Using session is trivial.
Session["Key"] = YourObject;
YourObject = (YourObject)Session["Key"]; Session will have a unique id called SessionId which will be sent along with the request to determine where to look for session data.
bsse wrote: i have to transfer a huge data from one page to another in my site
Keeping huge data in sessions should be avoided. Session variables are kept on server and your server will die when huge data is set on session. You can update the data to a database table and access it from the other page instead.
|
|
|
|
|
hi all,
i am not able to update the database using gridview.
the code which i written is mentioned below
protected void Row_Updating(object sender, GridViewUpdateEventArgs e)
{
// Label lblId = (Label)CustomerGrid.Rows[e.RowIndex].FindControl("lblContactName");
TextBox txtName = (TextBox)CustomerGrid.Rows[e.RowIndex].FindControl("txtContactName");
TextBox CompanyName = (TextBox)CustomerGrid.Rows[e.RowIndex].FindControl("txtCompanyName");
TextBox Designation = (TextBox)CustomerGrid.Rows[e.RowIndex].FindControl("txtDesignation");
//CustomerGrid.EditIndex = -1;
string myQuery = "UPDATE [customer] SET [Contactname]=@Contactname ,[CompanyName]= @companyName,[Designation] = @Desgination where [CompanyName]= @companyName";
string dataBaseConnection = "Data Source=DAYAKAR\\sqlexpress; Initial Catalog=hospital;Integrated Security=true";
SqlConnection updateCon = new SqlConnection(dataBaseConnection);
SqlCommand updateCommand = new SqlCommand(myQuery, updateCon);
//updateCommand.Parameters.Add(new SqlParameter("@Contactname", SqlDbType.VarChar, 50));
//updateCommand.Parameters["@Contactname"].Value = txtName.Text;
updateCommand.Parameters.AddWithValue("Contactname", txtName.Text);
updateCommand.Parameters.AddWithValue("CompanyName", CompanyName.Text);
updateCommand.Parameters.AddWithValue("Designation", Designation.Text);
SqlDataAdapter updateDA = new SqlDataAdapter(updateCommand);
//CustomerGrid.EditIndex = -1;
string sqlStatement = "Select * from customer";
SqlConnection con = new SqlConnection(dataBaseConnection);
SqlCommand myCommand = new SqlCommand(sqlStatement, con);
SqlDataAdapter da = new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
da.Fill(ds,"customer");
if (ds.Tables.Count > 0)
{
CustomerGrid.DataSource = ds;
CustomerGrid.DataBind();
}
}
}
by using above mentioned code i am not able to update the db.
can anybody help regarding this.
Thanks and Regards
Dayakar D.N
|
|
|
|
|
DayaKar:
What do you meant by not able to update? Are you getting any error? Have you stepped into the code?
|
|
|
|
|
Please when I display my report using the crystal report embedded with visual studio it displays my report at first click but if I click the back button and run the report again I receive a blank page.
Can someone help out on this. here is a sample code of how I load the report Or is there a better way of loading and displaying my reports
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Try
BindReport()
Catch ex As Exception
End Try
End Sub
Sub BindReport()
s3 = Session("rptDocName")
s2 = Session("QryStr")
s = Session("srcTable")
Try
Dim myConnection As New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("LocalSqlServer").ToString)
Dim MyCommand As New SqlCommand()
MyCommand.CommandType = CommandType.Text
Dim MyDA As New SqlDataAdapter(s2, myConnection)
Dim myDS As New DataSet1()
MyDA.Fill(myDS, s)
Dim rdoc As New ReportDocument
rdoc.Load(Server.MapPath("rpt/" & s3 & ".rpt"))
rdoc.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rdoc
CrystalReportViewer1.DataBind()
Catch ex As Exception
End Try
End Sub
SPC Nigeria
Thanks.
|
|
|
|
|
How do I implement this new effect of displaying the application icon with the url and also with the page title the explorer tab
thanks
SPC Nigeria
Thanks.
|
|
|
|