|
|
Thanks Man. You helped me alot. You solved my problem.
|
|
|
|
|
Great! Go ahead.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
hi all,
I have tried following codes :-
window.opener.location.reload(true);
and
window.opener.document.forms[0].submit();
these are working for normal popup but doesnot work for showmodaldialog() method and it displays an Javascript error that cannot find object.
How will I refresh my grid, which is in parent page and within a update pannel,when I will click on the close button of the chield page the chield page(showmodaldialog()) should close and the parent grid should refreshed with the changed data.
-----------------------------------------
window.opener.location.reload(true);
for a 'normal' window, but this doesn't work for showModalDialog. It is
modal as far as the client is concerned but not the server...
In my app I have a datagrid on the main aspx page, I pop up a modal dialog
to edit a record. On closing the modal dialog I'd like to refresh the
datagrid with the new data.
----------------------------------------------
Please help!!!!!!!!!!!!!!
Thanks and Regards
Bikash
|
|
|
|
|
I am also having the same issue ?.Does anyone have solution for this ?.
K.Anantha rengan
|
|
|
|
|
I have one datagrid,i want to add a
textbox in footer,and the code is below,but
i am not getting it.One header("comments") is there and
i want to get the textbox under(ie in footer)that header
<asp:TemplateColumn HeaderText="Comments">
<HeaderStyle Font-Bold="True" Wrap="False"></HeaderStyle>
<ItemTemplate>
<a href="javascript:void(window.showModalDialog('HRComments.aspx?CID=<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',null,'dialogHeight:12em;dialogWidth:15em;status:no;scrolling:no'));" onmouseover="Javascript:abc();">Comments</a>
<!--<a href="#" onclick="ShowDetails();GetCandId('<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>','<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>',popHRComments)">Comments</a>-->
</ItemTemplate>
<FooterTemplate>
<asp:TextBox Runat="server" ID="txt">Total </asp:TextBox>
</FooterTemplate>
</asp:TemplateColumn>
|
|
|
|
|
use the mark up below.
<a href='javascript:void(window.showModalDialog(''HRComments.aspx?CID=
<%# DataBinder.Eval(Container.DataItem, "DB_CANDT_ID")%>
&QStringCandtName=<%# DataBinder.Eval(Container.DataItem, "CandidateName")%>''
,null,''dialogHeight:12em;dialogWidth:15em;status:no;scrolling:no''));'
onmouseover="Javascript:abc();">Comments</a>
---------------
Basically problem was due to the intermingling of single and double quotes.
What you need to do is use single quotes for begin/end strings in javascript and if there is any single quote inside a javascript string itself put two single quotes ('') as i have used above.
e.g. ... showModalDialog(''HRComments...
in above line of html there are two single quotes and not a double quote.
And the double quotes should be used only within sever tags.
I hope that helps.
s.a.w.
|
|
|
|
|
hello friends...
I want to get the full path of the selected file.
i have done it using FileUpload1.PostedFile.FileName ....
but the problem is everything is working fine in IE ....but not in mozilla...safari....
actually i want to get the full path of the selected file...not the file name only..........
I want to know about that file means...that file has from which drive/folder....that information will store in text file
thank you.....
|
|
|
|
|
hi,u want to get the full path of the file name
try this ..
var x = Server.MapPath(FileUpload1.FileName);
cheers
venu gopal reddy..
|
|
|
|
|
Hi, what s the use of the following command in the top of the coding.
if (!Page.IsPostBack)
Can anyone explain?
|
|
|
|
|
Karthick_gc wrote: what s the use of the following command in the top of the coding.
It can be anywhere, but normally it will be at or near the top of the Page_Load method.
Karthick_gc wrote: if (!Page.IsPostBack)
It runs a section of code conditionall based on whether this page is posted back or not.
IsPostBack is a boolean that returns true if the page is posted back. i.e. the user has already seen the page and has now pressed a button that has caused an HTTP POST request back to the server.
Normally, you need to initialise stuff on the first display of the page, hence the if not IsPostBack. This information would be normally held in viewstate so that on subsequent displays of the page it can retrieve the information from the viewstate and you don't have to repeat the initialisation.
Does this help?
|
|
|
|
|
Hi All,
Can somebody help me to access an XML webservice using Jquery in asp.net 2.0. I have tried googleing, but all the examples are using datetype=JSON which is not working in my project.It will be great if one can help me out to access the same web service by the fastest means but with out using AJAX.
Many Thanks,
D'Kng
|
|
|
|
|
Hi to all,
I am working on a shopping cart project. Now there is a situation that whenever adds the same product again and again, only quantity should be updated instead of adding a new everytime. I unable to do this. I tried like this.
1 protected void Page_Load(object sender, EventArgs e)
2 {
3 try
4 {
5 HyperLink HLink = (HyperLink)Master.FindControl("HyperLink3");
6 if (HLink != null)
7 {
8 HLink.Enabled = false;
9 }
10
11
12 if (!Page.IsPostBack)
13 {
14 if (Session["Cart"] == null)
15 {
16 Lblmsg.Visible = true;
17 dt = new DataTable();
18 dt.Columns.Add("REF", typeof(string));
19 dt.Columns.Add("Description", typeof(string));
20 dt.Columns.Add("QTY", typeof(int));
21 dt.Columns.Add("Price", typeof(float));
22 dt.Columns.Add("Cost", typeof(float));
23 get_data();
24 Session["Cart"] = dt;
25 }
26 else
27 {
28 Lblmsg.Visible = false;
29 dt = (DataTable)Session["Cart"];
30 get_data();
31 update_for_same();
32 Session["Cart"] = dt;
33 }
34 }
35 }
36 catch(Exception ee)
37 {
38 Lblmsg.Text = ee.Message;
39 }
40 }
41
42 public void get_data()
43 {
44 try
45 {
46 pro_id = Request.QueryString["pr_id"];
47 quanti = Convert.ToInt32(Request.QueryString["quant"]);
48
49 if (pro_id != null)
50 {
51 SqlConnection con = new SqlConnection("Server=.; Database=eclsc; Trusted_Connection=yes");
52 SqlCommand cmd = new SqlCommand();
53 cmd.Connection = con;
54 cmd.CommandText = "select ICEMACHINES.product_id,ICEMACHINES.sh_desc,ICEMACHINES.price from ICEMACHINES where ICEMACHINES.product_id LIKE @product_id union select GLASSWARE.product_id,GLASSWARE.sh_desc,GLASSWARE.price from GLASSWARE where GLASSWARE.product_id LIKE @product_id ";
55 cmd.Parameters.Add("@product_id", SqlDbType.NVarChar, 50).Value = pro_id;
56 cmd.Connection.Open();
57 SqlDataReader rdr = cmd.ExecuteReader();
58 ArrayList arRole1 = new ArrayList();
59
60 while (rdr.Read())
61 {
62 desc = (rdr["sh_desc"]).ToString();
63 id = (rdr["product_id"]).ToString();
64 unitprice = Convert.ToSingle((rdr["price"]));
65 cost = unitprice * quanti;
66
67 }
68 cmd.Connection.Close();
69
70 DataRow myrow = dt.NewRow();
71 myrow["REF"] = id;
72 myrow["Description"] = desc;
73 myrow["QTY"] = quanti;
74 myrow["Price"] = unitprice;
75 myrow["Cost"] = cost;
76
77 dt.Rows.Add(myrow);
78 dt.AcceptChanges();
79 Session["data"] = dt;
80 GridView1.DataSource = dt;
81 GridView1.DataBind();
82
83
84 }
85 else
86 {
87 int a = 1;
88 }
89 total_items = total_items + quanti;
90 total_Price = total_Price + cost;
91 Session["items"] = total_items;
92 Session["value"] = total_Price;
93 }
94 catch(Exception ee)
95 {
96 Lblmsg.Text = ee.Message;
97 }
98 }
99
100 public void update_for_same()
101 {
102 try
103 {
104 foreach (GridViewRow rowItem in GridView1.Rows)
105 {
106 count = GridView1.Rows.Count;
107
108 index = rowItem.RowIndex;
109
110 id3 = GridView1.DataKeys[index].Value.ToString();
111
112
113 TextBox TxtQTY = (TextBox)rowItem.Cells[2].FindControl("TxtQTY");
114 Txt2 = Convert.ToInt32(TxtQTY.Text);
115 }
116 }
117 catch(Exception ee)
118 {
119 Lblmsg.Text = ee.Message;
120 }
121 }
But I dont know how to do this. Please assist me.
cheers,
sneha
|
|
|
|
|
sneha Choudhary wrote: only quantity should be updated instead of adding a new everytime.
Datatable has a Select method. You can use it to get a specific product from the datable. If you are getting any rows, update it, else insert a new item.
Don't you think keeping shopping cart information in a session is a bad idea?
|
|
|
|
|
Hi,
Thanks for the reply.
Actually I am very new in web development. So can you please tell me the reason why I should not use session for shopping cart information.
waiting for your reply.
cheers,
sneha
|
|
|
|
|
use hash tables when ur using session for shopping cart
cheers
venu gopal reddy
|
|
|
|
|
Hello Venu gopal reddy,
Thanks for your response.I am too worried for this issue.
You mean to say if I have to transfer certain data from one page to another I should use hash table.
I just want to share certain things with you.
Actually I used session variables to carry the data of datatable to another page.
Is it not safe?
waiting for your reply...
cheers,
sneha
|
|
|
|
|
hi sneha.
recently i worked on shopping cart. i want to share some experience with u
Hash functions are mostly used to speed up table lookup or data comparison tasks — such as finding items in a database, detecting duplicated or similar records in a large file
Hashtable HT2== (Hashtable) Session["basket"];
coming to sessions when ever the session expires u will get error
and even sessions will degrade the performance
regards
venu gopal reddy
|
|
|
|
|
venu656 wrote: hi sneha.
recently i worked on shopping cart. i want to share some experience with u
Hash functions are mostly used to speed up table lookup or data comparison tasks — such as finding items in a database, detecting duplicated or similar records in a large file
Hashtable HT2== (Hashtable) Session["basket"];
coming to sessions when ever the session expires u will get error
and even sessions will degrade the performance
regards
venu gopal reddy
Hi,
Thanks for sharing your views. I want to know a little more about this.
If we will increase the session expiration time then also it will give the error?
I have never used hashtable so I will study it in detail. Thanks for your advice.
cheers,
sneha
|
|
|
|
|
hi,
if u increase the session time the problem will not persist but what i want to expalin is that it is heavy weight ...
|
|
|
|
|
venu656 wrote: hi,
if u increase the session time the problem will not persist but what i want to expalin is that it is heavy weight ...
Hi,
I got your point. Thanks a lot for your help.
Looking forward for the great help in future.
cheers,
sneha
|
|
|
|
|
all the best
feel free to ask
regards
venu656@gmail.com
|
|
|
|
|
I am frequently facing this message from my Web Application hosted at third party server.
Problem description is as below:
Could not load file or assembly 'App_Code' or one of its dependencies. There is not enough space on the disk. (Exception from HRESULT: 0x80070070)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'App_Code' or one of its dependencies. There is not enough space on the disk. (Exception from HRESULT: 0x80070070)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'App_Code' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly 'App_Code' or one of its dependencies. There is not enough space on the disk. (Exception from HRESULT: 0x80070070)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32
[ConfigurationErrorsException: Could not load file or assembly 'App_Code' or one of its dependencies. There is not enough space on the disk. (Exception from HRESULT: 0x80070070)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +211
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +267
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +39
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +75
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +582
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161
Can any one help me out?
Thanks in advance.
|
|
|
|
|
Can you Check the Disk Space and tell us how much is left
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
HI,
it occupies
28743.75 MB of 150000.00 MB ( i.e. only 19.16%) of total disk space is used.
Rgds
Mangal
|
|
|
|
|