|
hi
i have a link button in datagrid control. and on run time linkbutton text is C:\Documents and Settings\rohit\Desktop\PMS\Data1\processing1.rar file. now i would like to save this file on mycomputer.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
You cannot access the files not in IIS path using a web application.
|
|
|
|
|
hi, I have a website that is hosted on iis 6.0 and it's domain name www.mywebsite.com
The virtual directory folder has anonymous access enabled and also integrated windows authentication checked also.
When a user writes www.mywebsite.com in his browser, a prompt for user credentials is displayed but if he writes www.mywebsite.com/login.aspx, it doesn't ask for any user credentials. I want to know how can I fix this. 3 months ago it was working fine. I don't what happened.
Note: recently the site owner registered a new domain www.mywebsite2.com that points to www.mywebsite.com so if a user writes www.mywerbsite2.com, it redirects to www.mywebsite.com.
Could this be the issue or what?
I don't want this prompt to appear when the user writes www.website.com.
Can someone help?
Thanks
|
|
|
|
|
hi,
how to use querystring.
how to set and get query string.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
hello...
you can set a query string by padding it to the url you want your user to be redirected to for example
at page 1
=========
<br />
void button1_click (object sender , EventArgs e)<br />
{<br />
Response.Redirect("page2.aspx?username="+textbox1.text+"&password="+textbox2.text);<br />
}<br />
now at page2
===========
you can access those query string data by accessing the query string request at the page2 as follows
at page 2
========
<br />
void Page_Load(object sender , EventArgs e)<br />
{<br />
if(Request.QueryString["username"] != null && Request.QueryString["password"] != null)<br />
{<br />
string username = Request.QueryString["usename"];<br />
string password = Request.QueryString["password"];<br />
}<br />
<br />
}<br />
Human knowledge belongs to the world.
|
|
|
|
|
<br />
Dim CurrentMaxDocumentIDForASpecificUser As Integer<br />
<br />
Private Sub GetMaxDocumentIDForASpecificUser()<br />
<br />
Dim Get_MaxDocumentIDForASpecificUser_StrSQL As String<br />
Dim Get_MaxDocumentIDForASpecificUser_ObjCmd As SqlCommand<br />
<br />
<br />
Dim strConn As String = ConfigurationManager.ConnectionStrings("HomeConnectionString").ToString()<br />
<br />
Dim MyCon As SqlConnection<br />
MyCon = New SqlConnection(strConn)<br />
<br />
Get_MaxDocumentIDForASpecificUser_StrSQL = "Select max(DocumentID) from UploadedDocuments where Owner='" & Trim(Session("CurrentlyLogedinUserName")) & "'"<br />
<br />
MyCon.Open()<br />
<br />
Get_MaxDocumentIDForASpecificUser_ObjCmd = New SqlCommand(Get_MaxDocumentIDForASpecificUser_StrSQL, MyCon)<br />
<br />
CurrentMaxDocumentIDForASpecificUser = Get_MaxDocumentIDForASpecificUser_ObjCmd.ExecuteScalar<br />
<br />
MyCon.Close()<br />
<br />
End Sub<br />
when i run this code for the very first time(when db table is empty)i am getting the following eror:
Conversion from type 'DBNull' to type 'Integer' is not valid.
how can i check this for null?
|
|
|
|
|
my friend you set that variable as integer
<br />
Dim CurrentMaxDocumentIDForASpecificUser As Integer<br />
and then run your sql command to retrieve the last inserted row
in the database and return that to you as object because ExecuteScalar() return only one record casted within type object
so if you want to check if that ExecuteScalar will return that record or there is no any records returned that is so easy
cast the return value of the ExecuteScalar to an integer and check it
<br />
Dim CurrentMaxDocumentIDForASpecificUser As Integer<br />
<br />
CurrentMaxDocumentIDForASpecificUser = (int)SqlCommand.ExecuteScalar();<br />
<br />
if(CurrentMaxDocumentIDForASpecificUser > 0)<br />
else<br />
Human knowledge belongs to the world.
|
|
|
|
|
<br />
Private Sub GetMaxDocumentIDForASpecificUser()<br />
<br />
Dim Get_MaxDocumentIDForASpecificUser_StrSQL As String<br />
Dim Get_MaxDocumentIDForASpecificUser_ObjCmd As SqlCommand<br />
<br />
<br />
Dim strConn As String = ConfigurationManager.ConnectionStrings("HomeConnectionString").ToString()<br />
<br />
Dim MyCon As SqlConnection<br />
MyCon = New SqlConnection(strConn)<br />
<br />
Get_MaxDocumentIDForASpecificUser_StrSQL = "Select max(DocumentID) from UploadedDocuments where Owner='" & Trim(Session("CurrentlyLogedinUserName")) & "'"<br />
<br />
MyCon.Open()<br />
<br />
Get_MaxDocumentIDForASpecificUser_ObjCmd = New SqlCommand(Get_MaxDocumentIDForASpecificUser_StrSQL, MyCon)<br />
<br />
CurrentMaxDocumentIDForASpecificUser = Get_MaxDocumentIDForASpecificUser_ObjCmd.ExecuteScalar<br />
<br />
If CurrentMaxDocumentIDForASpecificUser Is DBNull.Value Then<br />
<br />
CurrentMaxDocumentIDForASpecificUser = 0<br />
Else<br />
<br />
End If<br />
<br />
MyCon.Close()<br />
End Sub<br />
changes in bold. now its working. thanks for replying
|
|
|
|
|
First of all, this is sql question
The problem is because when the table is empty, it doest have a value on that column
What you need is to chnage this:
Get_MaxDocumentIDForASpecificUser_StrSQL = "Select max(DocumentID) from UploadedDocuments where Owner='" & Trim(Session("CurrentlyLogedinUserName")) & "'"
Get_MaxDocumentIDForASpecificUser_StrSQL = "Select max(isnull(DocumentID,0)) from UploadedDocuments where Owner='" & Trim(Session("CurrentlyLogedinUserName")) & "'"<br />
Alexei Rodriguez
|
|
|
|
|
I am developing a application for daily attendance system. How can I maintain the database for that. Is MSAccess can be ok or should use sql database?.
What will be the logic for design database.
Can any one give me idea??
Thanks in advance!
|
|
|
|
|
hi
great i guess employeeattendance consists of en employeeid,Employeename,so called constrains as of my knowledge if you plan a relational constrains then u can go for SQL database else can also work on with axis i would recommend My sql which is free of cost and lisence free also an RDBMS. so if you can give me the requirements i would help you in finding a design of your database
|
|
|
|
|
I would use SQL rather than Access. There are too many reasons to list here.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
If he asks this kind of question maybe he should stay at the Access Kids Table.
Blog link to be reinstated at a later date.
|
|
|
|
|
|
No SQL injection attack for you mister!
Blog link to be reinstated at a later date.
|
|
|
|
|
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
--> i use only server controls in my website. will this affect my website performance or some other things...
--> wat will u suggest 4 me to do..?
J A Nasir K
|
|
|
|
|
I am developing asp.net application. i have a visual basic exe. when use this exe in asp.net. for the below code
-------------------------------------
Process startinfo = new Process();
startinfo.EnableRaisingEvents = false;
startinfo.StartInfo.FileName = Server.MapPath("~//FolderName\\RR.exe");
startinfo.Start();
--------------------------------------
it is succeffully runing.
when my asp.net web application to run the IIS after publishing. Then that exe not running.
Plz help me. what's probleam.
I have been already full control that folder within store exe.
|
|
|
|
|
Hi I am developing an webpage.There is a textbox in my webpage.On keypress event of my textbox,I want some data to be fetched from database and to be shown in a gridview below.I know I have to use AJAX to achieve this,but dunno how.Can anybody guide me?Thanx
ARINDAM
|
|
|
|
|
|
you can use clientcallback feature.
serch for the same in google.
all the best
Thanks & Regards
Pete
|
|
|
|
|
here i am using class file which has a the required code for my application and have called it in each and every web form where ever required, and sending my arguments to the class where my code is used here i am calling class ps = new class(); and passing the values the problem is its working properly in the local intranet when run but this is the problem with web server when he files are placed in the web folder can any one solve this for me..
|
|
|
|
|
you have to escalate privilage for this class and particularly for this method to access files on the web server
it works fine for you at the intranet because you have windows account access through the intranet but visitors online are anonymous users you have to set permissions to the method you want it to call folders or files at the web server for online anonymous users
because visitors when they run the web application they have anonymous access only to your web applications so you have to provide code access security for this method and grant access to the anonymous role if you used membership or something
search for "Code access security" and read about it
thanks
Human knowledge belongs to the world.
|
|
|
|
|
hi
i have a web site which is running perfectly in the localhost of the local intranet, but when placing the whole folder in the web space i could not get the application run. so i want a perfect procedure for hosting my site inthe web space provided, and the detailed steps involved to set up or publish the web site before placing the files in the web space to get the application run.will be greatfull to the person who can give me some procedure to be followed.
|
|
|
|