Can any one please provide any solution on the below requirement.
1. Once we export .iqy file from Sharepoint site and if any one update from sharepoint site.
2. I need current live data from .iqy file with out refresh using C# code
3. I need that live data from .iqy file and export to excel with out clicking on refersh button.
Once i downloaded .iqy file from sharepoint what ever data updated in the sharepoint i need that data automatically save into my MS SQL server database using c# code with out click on referesh button in .iqy file.
Please help us on this requirement.

Aman GuptaRank #193 · 12.4K reputationPosted Jan 8, 2023, 11:38 AM EST
Use Ajax Extension, Here is a quick example:
.aspx File
aspx.cs File - add this to the Click event of the Login Button
protected void Button1_Click(object sender, EventArgs e) { string sql = ""; SqlConnection cn = null; SqlCommand cmd = null; SqlDataReader dr = null; string User = username.Text; string Pwd = passwd.Text; //cn = ">"; try { cn.Open(); // Your code sql = "EXEC dbo.sProc_Admin_Auth @UserNm = '" + User + "',@Pwd = '" + Pwd + "'"; cmd = new SqlCommand(sql, cn); dr = cmd.ExecuteReader(); if (dr.Read()) { Session["UserId"] = dr["UserId"].ToString(); Session["LoginId"] = User; Session["UserNm"] = dr["FullNm"].ToString();// "Jayasurya Satheesh"; Session["Email"] = dr["Email"].ToString(); Session["JoinDt"] = dr["CreateDt"].ToString(); Response.Redirect("Index.aspx"); LblError.Visible = false; } else { LblError.Visible = true; LblError.Text = "Login Failed!"; } } catch (Exception exce) { LblError.Text = exce.Message; } finally { cn.Close(); } }You can find UpdatePanel and ScriptManager under Toolbox -> Ajax Extension
Use try-catch block to handle runtime exceptions.
anand mRank #4,053 · 369 reputationPosted Jan 8, 2023, 11:44 AM EST
Hello Aman,
issue is not with refresh the content. my issue once downloaded the .iqy file from sharepoint if any one updated any changes in the sharepoint I need that data automatically with out opening .iqy file and click on referesh button explictily and I dont want every time opened .iqy file and refresh . I need solution to get this updated data from sharepoint using .iqy file with out referesh.
Hope this understood for you.