|
Hello all
I have created a console application in c#.net to run some specific task on server.I have also create exe file so that it it will run at a given time.
When i set a task in scheduler then i have found that it dosenot allow to run exe file. It only allow file with some .bat,.cmd etc extension.
Can anybody tell me how can i create .bat or .cmd file of my console application.
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: I have created a console application in c#.net
Then why you asked that question in asp.net forum ? Please place it proper place.
Any way for creating Batch file Try to use TextWriter
cheers,
Abhijit
|
|
|
|
|
Hi
Can you explain me in details how can i create using text writer any example?
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: Can you explain me in details how can i create using text writer any example?
Try This[^]
cheers,
Abhijit
|
|
|
|
|
Thanks
i will try it and come back to you.
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi all
I have one procedure in sqlserver.
create procedure pro_UpdateCompanyData(@oldvalue varchar(50),@newvalue varchar(50))
as
set nocount on
Update CompanyType Set CompanyType.type=@newvalue where CompanyType.type=@oldvalue
Go
Type is my columnname in table CompanyType.
now I have one gridview on page.I did Editcolumn and add edit,update and cancle button.
i write some code on gridview_Rowupdated event.
SqlDataSource1.UpdateCommandType=SqlDataSourceCommandType.StoredProcedure;
SqlDataSource1.UpdateParameters.Add(new Parameter("@oldvalue", System.TypeCode.String, ((string)Session["oldvalue"])));
SqlDataSource1.UpdateParameters.Add(new Parameter("@newvalue", System.TypeCode.String, newvalue));
SqlDataSource1.UpdateCommand ="pro_UpdateCompanyData";
"@type is not a parameter for procedure pro_UpdateCompanyData."
this error arise in this code.
I am not getting this point.pls suggest me.
Thanks
monika
|
|
|
|
|
monika_vasvani wrote: "@type is not a parameter for procedure pro_UpdateCompanyData."
Error clearly says, you are passing wrong parameters to the store procedures.
cheers,
Abhijit
|
|
|
|
|
Dear Friend's
I have created a base class which use to set common "javascript" file to the form it's working fine but now i want to access one DIV control (which is server side) to initialize it's value as per business logic, how to access that control using the base class.....
i am creating my web form using Visual Studio 2005, using c# language.
Thanks and Regards,
Santosh A Sawant
Sasmi
|
|
|
|
|
I didn't get your point ? Do you want to access the div control from javascript which is a server side control ? Please confirm .
cheers,
Abhijit
|
|
|
|
|
No, this base class is use for some business logic inherit to my Page Partial class and i want to use it to access my DIV control which is server side control on that form.
Sasmi
|
|
|
|
|
Hi,
I know this query is not related with ASP.NET but didn't find suitable forum to post this valid web situation.
I want to know how can we prevent multiple login in ASP site using same userid and password?
Design suggestion are most welcome !!!
Thanks,
|
|
|
|
|
Jaiprakash M Bankolli wrote: I want to know how can we prevent multiple login in ASP site using same userid and password?
Using databases . When User login into your application , check is there any entry in the database with that user name or not. If not, make an entry and enter into the application. If yes, message that some one has already logged in into the application it the same credentials.
Check it on Login
if(UserIsInApplication(UserID))
{
Alert("Already Logged in with the same credentials..."
}
else
{
MakeDBEntry(UserID);
LoginApplicatin(UserID);
}
Note :
You have to implement all those methods, I have given just for your understanding
Remove the DataEntry from database when user log off Application , other wise user never be logged into the application .
Here is another Tricks , What happend , If user close the browser instead of Click on "Logoff"
[Added]
Jaiprakash M Bankolli wrote: know this query is not related with ASP.NET
Apologies. I didn't read this section . Extremely sorry.
[/Added]
cheers,
Abhijit
|
|
|
|
|
I had same design in mind but had stuck with the point that you have mentioned "What will happen , If user close the browser instead of Click on "Logoff"...
So if you have some more idea in mind let me know ...
Thanks anyways !!
|
|
|
|
|
Jaiprakash M Bankolli wrote:
So if you have some more idea in mind let me know
I had made a javascript function , that will call on the page unload if and only if , the user close the Browser ([X]), Alt+F4 and From Task Manager.
on that function , I have open a popup ( Location will not be visible to user means top=10000, left =200000 like that ) and from there I have callled the server side code to clear database .
What about yours ?
cheers,
Abhijit
|
|
|
|
|
That sounds good idea.. Let me try that, how did you trap browser close From Task Manager.
|
|
|
|
|
just try this ant let me know
function DeleteUserLog()
{
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("Removelogs.aspx", "OpenWindow_Close_Session",'left=12000,top=1200,width=10,height=1');
}
}
cheers,
Abhijit
|
|
|
|
|
Dear All,
I have a user control inside a page which is used to login.
Also the page has a search option.
When the "Login" option is clicked the login window will be opened using the popup control extender (AJAX Control).
When the popup is opened then the default button for the page should be the "Submit" button in the login window which is in the user control.
If the Login window is not opened then the "Search" button has to act as the default button and while clicking on enter key it has to call the search function.
I have coded as the following to set the "Submit" button as the default button in the user control on page load of the user control.
Page.Form.DefaultButton = this.FindControl("imgbtnSubmit").UniqueID;
Can any one tell me how to get rid of this issue?
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
i want to get the distribution list and group ids in a list box. i have been sucessful to get filter in first name and last name through Directory searcher class.
mySearcher.Filter = "(&(objectClass=user)(|sn=" + txtLastName.Text.Trim().ToString() + "*)(givenname=" + txtFirstName.Text.Trim().ToString() + "*))";
// mySearcher.Filter ="(&(objectClass=group)(|(sn=" + txtLastName.Text.Trim().ToString() + ")))";
results = mySearcher.FindAll();
foreach (SearchResult result in results)
{
LstEmailAddress.Items.Add(Convert.ToString(result.Properties["displayName"][0]));
lstMemberGroups.Items.Add(Convert.ToString(result.Properties["memberof"][0]));
}
|
|
|
|
|
First of all this is nothing related with asp.net . This is simple C# code.
Please Read This[^]
cheers,
Abhijit
|
|
|
|
|
Hi,
I am working on a datalist control in which in which I have two server controls. One is Image Button and another is Hyperlink.
On running, an image and a text is coming in datalist.
Now I want that text in a variable.
Actually I am using:
protected void Image_Click(object sender, EventArgs e)
{
get_name();
string nam = (string)ViewState["Testnam"];
Response.Redirect("SubCategory.aspx?name="+nam);
}
public void get_name()
{
nam = DataList1.SelectedItem.DataItem.ToString();
ViewState["Testnam"] = nam;
}
Image _Click is the onclick event in image button in datalist.
How can I retrieve the text of that hyperlink.
Please assist me.Thanks in advance.
Cheers,
Nripendra
|
|
|
|
|
Hi There,
I have a problem.I am giving option to user to change the theme of web page.
and what I want to do is that I want to retrieve color of theme when user select that theme.Can anybody tell me.I am using Asp.Net 2.0 and C#.Net.
Thanks,
|
|
|
|
|
ArifShaikh wrote: what I want to do is that I want to retrieve color of theme when user select that theme
User should select Theme from any control. Means they can select by clicking a link , or from dropdown. Now if they selecting from dropdown , then you should no the value that what user selecting , based on that you can change the theme.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
I had succeeded in changing theme.My problem is that I want to retrieve main color of theme.
Thanks.
|
|
|
|
|
ArifShaikh wrote: y problem is that I want to retrieve main color of theme
From where User selecting the Theme color ?
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
He is not selecting color he is just selecting theme from DropDown list box.But Actually I am showing my all error messages in div tag using javascript.When error comes it popup message in that div tag.I want to apply same theme to that Div tag.I am not able to do this thats why I was asking for retrieving color.So that after retrieving color I could pass it to my javascript function.If you know how apply theme to div tag then please tell me.
Thanks.
|
|
|
|