|
I have an edit web page, and i need to reset the page when the user click the reset button , because is the edit record page, so the original record must be show on the text box , checkbox and other control, must be show for the user if they click the reset button. So, how i do it ?
Thanks.
Best regards,
Chee ken
|
|
|
|
|
You can call all the methods to get the data again from the database or alternatively you can also redirect to the same page that will also serve the purpose.
Best Regards,
Apurva Kaushal
|
|
|
|
|
i get the url of the page and then redirect to it , and it run already, thanks for you help !
Best regards,
Chee ken
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello,
I have a Web.sitemap file where I added in each node the parameter "footer" which I set to true or false.
I am creating a SiteMap datasource but I would like it to have only the nodes where "footer" is set to "true".
I have no idea how to create this filter.
Could someone, please, help me?
Thanks,
Miguel
|
|
|
|
|
Because you add a custom property footer to the SiteMapNode, so you may need to create your own custom site map provider, and you can do your filter when building the sitemap nodes in the provider.
|
|
|
|
|
Hello,
How to create a CSS StyleSheet at runtime?
And after I create it should I added it to an existing CSS file? How would I use it in an Asp.Net control?
Thanks,
Miguel
|
|
|
|
|
The stylesheet css is a text file, you can dynamically create at runtime or edit the current file, and I guess you know how to do this. To apply the new style classes, you need to link to the file and programmatically set the cssclass for the control, you can also think of changing the style of the control using the skinID property.
|
|
|
|
|
Hi,
Is there anybody knows how to kill a session in server side?
Thanks
|
|
|
|
|
|
Session.Abandon() just kill the current session, but I want to kill the session with the spical ID.
Thanks.
|
|
|
|
|
I think you'd have to keep track of all your sessions at the Application level in order to do that.
|
|
|
|
|
Well Rather killing ..If you want to kill a specific Session..then u can remove that session by Session.Remove("Name of Session")
I hope it satisfies u...
KHATRI
|
|
|
|
|
That deletes a session item from the current session. From what I understood, he wants to abandon a specific session (not the current session, but some other user's session).
|
|
|
|
|
Yes, I did. But I do not know how to use it.
Thanks
|
|
|
|
|
I'm trying to get IE to open a file download dialog, but no matter what I try, it just ignores it and moves on. Everywhere I've searched has more or less the same information on how to use Response.WriteFile; I'm totally clueless as to why this isn't working.
Response.ClearHeaders();
Response.ClearContent();
Response.ContentType = "application/x-msdownload";
string thefilename = "Test1.txt";
Response.AppendHeader("content-disposition", "attachment; filename=\"" + thefilename + "\"" );
Response.Flush();
Response.WriteFile(strExport);
Response.Close();
strExport is a valid filename;
At this point I'm not sure what else to try. Two developers I work with also cannot get it working. Grrrr.....arrrgh!
|
|
|
|
|
See the following code:
Dim dwnURL As String = CType(sender, LinkButton).CommandArgument
If dwnURL.Length > 0 Then
Dim filepath As String
filepath = System.Web.Hosting.HostingEnvironment.MapPath(dwnURL)
'Check whether the download file exists or not. if does not exists, send auto-generated email to the admin specificying
'the at which URL it occured and the file which is not found.
If Not System.IO.File.Exists(filepath) Then
Session("FNN_AbsolutePath") = filepath
Session("BackURL") = Request.UrlReferrer
Response.Redirect("~/BrokenLink.aspx")
End If
Dim onlyFileName As String = System.IO.Path.GetFileName(filepath)
' Open File
If Not System.IO.File.Exists(filepath) Then
' popFileNotFound.Link = "" ' ResolveUrl("~/admin/email.aspx")
'popNewMail.Title = GetGlobalResourceObject("mail", "newMail")
' popNewMail.Message = String.Format(GetGlobalResourceObject("mail", "newMailMessage"), _newMailCount.ToString())
popFileNotFound.AutoShow = True
popFileNotFound.Visible = True
Exit Sub
End If
Dim fs As New IO.FileStream(filepath, IO.FileMode.Open)
Dim bytes(fs.Length) As Byte
fs.Read(bytes, 0, fs.Length)
fs.Close()
' Send the file as Response
Response.AddHeader("Content-disposition", "attachment; filename=" & onlyFileName)
Response.ContentType = "application/octet-stream"
Response.BinaryWrite(bytes)
Response.End()
I think you need to End() the response rather than Close()
|
|
|
|
|
Yeah, I tried all different combinations using End, Flush, and Close; nothing helped.
This morning I created a standalone project with just a page and a button. The button click event was using the same code to open the download box and it worked fine; dialog box opened right up and gave me the Save or Open options, both of which worked.
I think I might explore using BinaryWrite instead, but since there's nothing wrong with my WriteFile code, I'm not hopeful that BinaryWrite will behave any differently.
|
|
|
|
|
Could this be related to master pages? The response is being called from the content page, but just doesn't open the dialog box.
|
|
|
|
|
the problem I was having was related to Anthem controls, in particular, the button that was supposed to fire the Responses is an Anthem button, and they behave a little differently than your average, ordinary, every day asp button.
Apparently when the 'EnableCallBack' property is true, Anthem uses some javascript to work it's magic instead of a postback; that's the whole point of a callback, I guess, but since my file was sitting on the server, it kinda needs a postback in order to get the data.
So I changed the property to False and the dialog box opened right up.
|
|
|
|
|
Has anyone ever come across a date *and* time picker component for asp.net?
there are zillions of Date *or* Time picker components out there, but I can't seem to find one that allows both at the same time in the same control.
|
|
|
|
|
|
|
I want some fields the edit/insert Mode in a DetailsView control to be multiline textboxes... There is no apparent option for this... anyone know a quick work around?
|
|
|
|
|
<asp:detailsview id="dv" runat="server">
<fields>
<asp:templatefield>
<insertitemtemplate>
<%----%>
<edititemtemplate>
<%----%>
<itemtemplate>
<%----%>
|
|
|
|