|
Hi,
I need user on client machine to select path from that machine (local folder only). On Upload, my web application needs to get all the files in that folder and upload it to fixed server path.
All I need is to get files for the selected client path.
Be simple and Be sample.
|
|
|
|
|
Hi,
I have a dotnet application in which i have to import data from an excel sheet and store datas in mysql table to display those datas in my dotnet application. Iam using this datas to display datas for generating employee salary slip in my dotnet application. pls do help me with source code in C#.
Regards
Vijay.
|
|
|
|
|
|
i have a database table to store all the article content which has a field is memo data type to store all the article content(generally contains richtext). how to use asp.net to read from a word document then store the content into this field?
I am Entry level person
|
|
|
|
|
hi the below was my attempt of trying to make a new browser pop up when a button is clicked with java scipt
although it compiles it doest work instead of poping up another browser it just redirect to inself couls some1 help me see if i did anyhting wrong pls
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<script type="text/javascript"><br />
function OpenWindow()<br />
{<br />
window.open("Default.aspx", "_blank");<br />
<br />
}</script><br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click1" /></div><br />
</form><br />
</body><br />
</html><br />
<br />
<br />
<br />
the code behind file in the form load<br />
<br />
<br />
Button1.Attributes.Add("Onclick", "<script>OpenWindow();</script>");
|
|
|
|
|
Try this, in your button click event (or even in its open function) add
Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
' Do some other processing...
Dim sb As New StringBuilder()
sb.Append("<script>")
sb.Append("window.open('http:
sb.Append("</scri");
sb.Append("pt>")
Page.RegisterStartupScript("test", sb.ToString())
End Sub
Then in your button
<asp:Button id="Button1" onclick="Button1_Click" runat="server" text="Go!"></asp:Button>
Make sure you add
Imports System.Text
To the top of your code behind as this uses the StringBuilder Class
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
my code behidn file is c# though >.<
|
|
|
|
|
Then convert the code to C#
void Button1_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script>");
sb.Append("window.open('http://msdn.microsoft.com', '', '');");
sb.Append("</scri");
sb.Append("pt>");
Page.RegisterStartupScript("test", sb.ToString());
}
" In the next millennium there are two kinds of business, those on the Internet and those out of business"
Bill Gates
"Be nice to nerds. Chances are you'll end up working for one."
Bill Gates
"Let's face it, the average computer user has the brain of a Spider Monkey."
Bill Gates
|
|
|
|
|
string buffer in vb means string builder in c#??
wow i didnt know >><
|
|
|
|
|
neodeaths wrote: string buffer in vb means string builder in c#?
No. StringBuffer is a Java class. It's StringBuilder both in VB.NET and C#.
---
single minded; short sighted; long gone;
|
|
|
|
|
use the following statement in your javascript
window.open("default.aspx","popupwindow","width=600,height=50px");
Koushik
|
|
|
|
|
Why do you do a postback to call the Javascript? Do it all in the browser:
<input type="button" value="Button" onclick="OpenWindow();" />
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I have a content page and I have textboxes for name, address, phoneNumber, email address.
But how can i use the following javascript for form validation because in contentpage there
is no html head and body section.
function FormValidate()
{
if(this.txtPhone.value.search(/\d{3}\-\d{3}\-\d{4}/)==-1)
{
alert("The phone number you entered is not valid.\r\nPlease enter a phone number with the format xxx-xxx-xxxx.");
return false;
}
}
|
|
|
|
|
You can add a tag inside "asp:content" tag and call the javascript functions. e.g. -
asp:Content ID="Content1" ContentPlaceHolderID="ContentHolderID" Runat="server">
<script type="text/javascript" language="javascript">
function FormValidate()
{
....
Hope this helps.
|
|
|
|
|
Good afternoon,
I am fumbling my way thru my first ASP.NET project and I have a question about contentplaceholders.
I have a master page that has 3 contentplaceholders. Pages that derive from this master page have custom html\text content in the contentplaceholders.
I want to allow users the ability to change the customer html\text for a derived page.
The master page:
<code>
<asp:ContentPlaceHolder ID="phMain" runat="server">
<h3>News of the day!</h3>
</asp:ContentPlaceHolder>
</code>
I want to programmatically alter the content of "phMain" in the master page from "News of the day! to "News of the Hour" in a derived page. Is there a way to do this without having to add controls (a label or textbox) to the contentplaceholder?
Thanks.
|
|
|
|
|
First of all you will have to create some javascript to determine if there is a link.
Then tou add a call to this script the event "ontextchanged"
if there is a link you can style the text as a link (blue and underline), then you add some javascript to the click event on the textbox to make the link work (location.href....)
Tha disadvantage with this method is that all the text in the textbox will be treated as a link. You cant have the value "klikk on http://www.dummy.com" and make only the url a link...
Hope this helps.
|
|
|
|
|
I have file names, strung out in a textbox, ie, file1.jpg, file2.doc,
Now I want bulid links off of those, with the hardcoded place the file is at.
Help? I can do it with one file, but not mutiple..
|
|
|
|
|
Hi Friends,
I have made a SQL DB Wrapper for my project. It is working perfect on my machine dure to local settings.But I am using a shared server on wich it is giving the following error :
<br />
Source Error: <br />
<br />
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. <br />
<br />
Stack Trace: <br />
<br />
<br />
[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]<br />
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0<br />
System.Security.CodeAccessPermission.Demand() +59<br />
System.Environment.GetEnvironmentVariable(String variable) +66<br />
Something.DataProvider.SQLDBFactory..ctor(Provider strProvider) +108<br />
Something.DataProvider.SQLDBAccess.ExecuteDataset(IDbConnection cnn, CommandType enumCommandType, String strCommandTxt, IDataParameter[] objCommandParameters) +126<br />
Something.DataProvider.BaseDataProcess.SP_ExecuteDataSet(String text, IDataParameter[] param) +119<br />
<br />
.....<br />
....<br />
<br />
Please help me to resolve the problem.
Thanks in Advance.
Deepak Surana
|
|
|
|
|
Hello,
Have you check that the database login has the appropriate permissions?
|
|
|
|
|
Yes i have checked the DB login id and pass.
Its a .Net error as far as i know, wichi is coming beacuse of some security permissions of the dll's
Deepak Surana
|
|
|
|
|
Hi,
I am stuck now. I have a master page. and I have one dropdownlist in master page. When I click one item on master page it redirects to me some folder and opens the file in that folder.
I am using one javascript for opening the url. but if I include that java script it doesn't go to that
selectedIndexChanged property. because I need to know the infdex of selected item in the dropdownlist.
but if I remove the javascript it goes to selexctediIndexChanged property event. But I need jhavascript to call
I don't know where is the problem. Could you please help me to solve it.
Thanks.
Here is my code in master page
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataSet ds;
ds = AppName();
DropDownList2.Items.Add(new ListItem("--Select Application--"));
DropDownList2.AppendDataBoundItems = true;
DropDownList2.DataSource = ds;
DropDownList2.DataTextField = "AppName";
DropDownList2.DataValueField = "AppLocation";
DropDownList2.DataBind();
}
DropDownList2.Attributes.Add("onchange", "goToNewPage(this.value)");
}
here is my Java script
function goToNewPage(url)
{
window.location.href=url;
alert("hello");
}
Here is my selectedIndexchanged property
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
int index = DropDownList2.SelectedIndex;
DataSet ds1;
ds1 = AppName();
Session["apprightid"] = Convert.ToInt32(ds1.Tables[0].Rows[index - 1][1]);
int count = Convert.ToInt32(ds1.Tables[0].Rows[index - 1][1]);
}
|
|
|
|
|
I am looking for a code for web application in asp.net which contineously
( i.e say 1-5 sec ) updates the database table.I tried to use ajax timer control but cant get solution coz it refreshed the page at given interval but not raised a event my airthmetic ie:
int i;
private void timer_tick(........)
{
i=i+1
label1.Text=i.ToString();
////database update codes//////
}
What should i do to fire my events in every 5 seconds..............plz its urgent
Pokhrel Rohit
|
|
|
|
|
If you're using SQL Server 2000 you could use Job Scheduling to update the table every so often.
|
|
|
|
|
How can Job Scheduling Solve problem of timer can you give me any idea.
I haven't gone through job scheduling ..........
Thank you
pokhrel rohit
|
|
|
|
|
I have data in a table that I would like to display in a radioButtonList, inside a dataGrid. The fields are such: QuestionID, Question, Option_1, Option_2, Option_3, etc. All these options are different potential answers that the user can select by means of a radio button. I need the values from these Option fields to populate the radioButtonList List Collection. (These options are different for every row). Is there a way to do this?
Thanks in advance.
|
|
|
|