|
dont know....
what requirement are needed to view the list of database...
when same username and password on in management studio it shows the list of databases...
|
|
|
|
|
Hello,
I would like access the shortcuts and its properties which is present in a client machine's directory (Desktop). How can I implement this with asp.net. Any hints would be appreciated.
Thanks for the help
Sebastian
|
|
|
|
|
No way.. places like Desktop or any client folder location is not accessible through HTML from the browser program because of security purpose.
Otherwise there will be a severe Security issue...
|
|
|
|
|
R u trying to hack someting.
|
|
|
|
|
|
So, you want to execute some exe from Client System ?
You can use ActiveX for that. But that will work only on IE.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
when you are using shopping cart website if any customers selects any thing from website and when he click add to cart and then buy then how to write the code
|
|
|
|
|
|
Suppose they are two button on the form. one with english and anothe with arabic.
when i click on arabic yhe whole web site should be in arabic. and when i click on english whole website should be on english..
|
|
|
|
|
Use PreRender to set
CurrentThread.CurrentCulture = new CultureInfo("yourculturekey");
And always use Resourcekey to show any text in the web page.
Check this :
Creating multilingual websites - Part 1[^]
I hope this is what you like.
|
|
|
|
|
Hi,
i am inheriting a masterpage in an aspx page. in the masterpage i am using updatepanel control.
now in the codebehind of that aspx page, when i complete the databasetransaction process, i want to display an alert box. But that alert box is not getting displayed as i am using updatepanel control.
prior to using updatepanelcontrol it was working as i use to display the alert box using httpcontext.current.response.write.
now as i am using updatepanelcontrol the alert box is not getting displayed by using registerscriptblock also.
Sandeep Kumbhar
|
|
|
|
|
i think this will help you[link]
|
|
|
|
|
Handle end request event of the update panel as following will may help you
1. Get instance of PageRequestManager
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
2. Callback function:
function endRequestHandler(sender, eventArgs)
{
if (eventArgs.get_error() != undefined && eventArgs.get_error().httpStatusCode == '500')
{
var error Message = eventArgs.get_error().message;
eventArgs.set_errorHandler(true);
alert(errorMessage);
} else
{
//alert($get("hidField").value);
}
}
|
|
|
|
|
Always use ScriptManager.RegisterStartupScript in case of Update panel rather than using ClientScript .
do like this :
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('hi');", true);
|
|
|
|
|
hi,
indeed this was a very good solution.
now i making this thing generic. so that i only have to call the msgpopup class and display the message. i am calling the dll of the project where i am writing the same code
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('hi');", true);
but this seems to be not working. it fails to display the message box.
following is the code in the dll.
the code:--
==========
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Text;
using System.Web.UI;
/// <summary>
/// Summary description for MsgPopUp
/// </summary>
public class MsgPopUp
{
protected static Hashtable handlerPages = new Hashtable();
public static void Show(string Message)
{
try
{
if (!(handlerPages.Contains(HttpContext.Current.Handler)))
{
Page currentPage = (Page)HttpContext.Current.Handler;
if (!((currentPage == null)))
{
Queue messageQueue = new Queue();
messageQueue.Enqueue(Message);
handlerPages.Add(HttpContext.Current.Handler, messageQueue);
currentPage.Unload += new EventHandler(CurrentPageUnload);
}
}
else
{
Queue queue = ((Queue)(handlerPages[HttpContext.Current.Handler]));
queue.Enqueue(Message);
}
}
catch (Exception ex)
{
throw ex;
}
}
private static void CurrentPageUnload(object sender, EventArgs e)
{
try
{
Queue queue = ((Queue)(handlerPages[HttpContext.Current.Handler]));
if (queue != null)
{
StringBuilder builder = new StringBuilder();
int iMsgCount = queue.Count;
builder.Append("<script language='javascript'>");
string sMsg;
while ((iMsgCount > 0))
{
iMsgCount = iMsgCount - 1;
sMsg = System.Convert.ToString(queue.Dequeue());
sMsg = sMsg.Replace("\"", "'");
builder.Append("alert( \"" + sMsg + "\" );");
}
builder.Append("</script>");
handlerPages.Remove(HttpContext.Current.Handler);
//HttpContext.Current.Response.Write(builder.ToString());
Page currentPage = (Page)HttpContext.Current.Handler;
ScriptManager.RegisterClientScriptBlock(currentPage, currentPage.GetType(), Guid.NewGuid().ToString(), "alert('from baseengine')", true);
//if (!script.IsClientScriptBlockRegistered(script.GetType(), "Alert"))
//{
// script.RegisterClientScriptBlock(script.GetType(), "Alert", "alert('record inserted');", false);
//}
}
}
catch (Exception ex)
{
throw ex;
}
}
}
}
Sandeep Kumbhar
modified on Wednesday, December 30, 2009 7:12 AM
|
|
|
|
|
Trying to build a SOAP web service using complex types and hit a road block. I am using VS to create a web reference to the SOAP service. ASP.NET 2.0, C#.
Getting the following error on the client:
System.NullReferenceException: Object reference not set to an instance of an object.
On the line setting the name on the SOAP client below, info.Organization.Name = "Test Org";
Here is what I have so far:
SOAP Web Service
[WebMethod]
public string CoverageRequest(RequestorInformation info)
{
return info.Organization.Name;
}
public class RequestorInformation
{
public Organization Organization;
}
public class Organization
{
public Organization() {}
private string _Name;
public string Name
{
get { return _Name; }
set { _Name = value; }
}
}
SOAP Client
VerifyInsurance.RequestorInformation info = new VerifyInsurance.RequestorInformation();
info.Organization.Name = "Test Org";
VerifyInsurance verify = new VerifyInsurance();
verify.CoverageRequest(info);
|
|
|
|
|
The Organization present in the object info is null.
Try this
VerifyInsurance.RequestorInformation info = new VerifyInsurance.RequestorInformation();
info.Organization = new Organization();
info.Organization.Name = "Test Org";
VerifyInsurance verify = new VerifyInsurance();
verify.CoverageRequest(info);
This should work.
|
|
|
|
|
My requirement is to create a msi package for a web application and deploy it to the target machine which already has the virtual directory and app pool configured. Now evertime when i try to install the web application thru the msi package, the setup should not ask for any inputs from the user(meaning no UI interface should be involved) and the msi should be successfully installed.
Can anyone please help me out?? I have googled a lot. Not finding a proper solution
|
|
|
|
|
You can developed one custom installer for that. Few years back I developed one quite similar tool. you can have a look into this
Custom Control using C# For Virtual Directory in IIS[^]
You can use this as a reference to create a custom tool.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks Abhijit. But then, in my target machine the Virtual directory and Application pool are already configured and i just have to create the msi package and install it in the target machine without any wizard for getting the inputs from the user during the installation process.
|
|
|
|
|
I am looking for a solution that would allow us to specify where the compiled code is located at, as well as all the servers are located at and it publish it out to there with a click of a button. This solution could also compile the code if not already prior to publishing it out there, but that is optional.
I am researching now how to see if this is possible in TFS.
Any ideas?
|
|
|
|
|
We have done the same requirement through CruiseControl .Net. You can google for Cruise COntrol to implement
|
|
|
|
|
I found this a few minutes ago and I'm currently installing it.
Thank you for the reply. I'll give it a test and see what it's like.
|
|
|
|
|
hey folks,
is there any .net webservice or something similar how I can check if some email is registered on facebook, twitter, linkedin, myspace?
Thx, Laziale
|
|
|
|
|
Hi,
I am developing project VirtualClassroom in C#,Asp.net framework 3.5,
How can i open the files like office document directly in asp.net page while taking online class...i am unable to open any document directly in asp.net page for online sharing of virtual classroom screen...
Please share some idea...
|
|
|
|