|
hi guys i am currently using asp.net2 c# to make a website
however i realise i needed some ajax controls so i installed the nessary files
and added the controls( script manager and calender extension)
altohuhg the page run but when the button is click and the date selector is not displayed anyone know y?
|
|
|
|
|
Hi All,
I need to Redirect the page using JavaScript.Is it Possible.If Please Help me.
Thanks and Regards
Narendra
|
|
|
|
|
You can use javascript:window.location.href='testpage.aspx' to redirect through javascript.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
hi i am trying to use the calendarextension from ajax but
i seem to have a problem it keep saying it need a tag called asp:scriptmanager
however when i try to add it in the page dont regconize it
<asp:ScriptManager runat="Server" EnableScriptGlobalization="true" EnableScriptLocalization="true" / >
|
|
|
|
|
Make sure that the scriptmanager is the first thing (ajax at least) on your page - it must be found before the calandarextension tag...
|
|
|
|
|
yes i done that i seems that the page dosnt regonize asp:scriptmanager do i need to define anything??
|
|
|
|
|
i was testing wit ajax and all i did was create a new c# website fellowed by putting the calender extension control, a textbox and a imagebutton.
setting the calender extension property to link to the textbox and imagebutton
and play.
then it showed an error regarding the script manager
|
|
|
|
|
I created a new ASP.Net website by Visual Studio 2005.
Used language : C#
Database: no use
Then uploaded by menu "Public website" is get error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 24: ASP.NET to identify an incoming user.
Line 25: -->
Line 26: <authentication mode="None">
Line 27:
Line 28:
|
|
|
|
|
Problem in assigning values to ItemArray...
I am assigning a new value (100) to the existing cell...
But the original value remains unaltered...
Here is the code:
ds.Tables[0].Rows[0].BeginEdit();
ds.Tables[0].Rows[0].ItemArray[0] = 100; ds.Tables[0].Rows[0].EndEdit();
Please help me.
Thank You.
Arun Kumar.A
|
|
|
|
|
Hi,
Try this.
ds.Tables[0].Rows[0].BeginEdit();
ds.Tables[0].Rows[0][0] = 100;
ds.Tables[0].Rows[0].EndEdit();
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi,
Thank U for Ur reply.
I will try this out.
Regards,
Arun Kumar.A
|
|
|
|
|
Some people don't know how to encrypt and later decrypt connectionStrings section of your web.config file. I've included a batch file that I use for this all the time. Hope this helps.
-START CRYPT.CMD-
@ECHO OFF
REM NOTE: THIS ASSUMES YOU HAVE INSTALLED VISUAL STUDIO 2005
REM IN THE DEFAULT LOCATION. CHANGE THE TOOL= TO REFLECT
REM YOUR LOCATION IF THIS DOES NOT WORK
set TOOL=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
IF "%1"=="" GOTO SYNTAX
IF "%1"=="/e" GOTO ENCRYPT
IF "%1"=="/E" GOTO ENCRYPT
IF "%1"=="/d" GOTO DECRYPT
IF "%1"=="/D" GOTO DECRYPT
GOTO SYNTAX
:ENCRYPT
ECHO Encrypting Connection Strings in %2
"%TOOL%aspnet_regiis.exe" -pe "connectionStrings" -app "%2" >NUL
GOTO END
:DECRYPT
ECHO Decrypting Connection Strings in %2
"%TOOL%aspnet_regiis.exe" -pd "connectionStrings" -app "%2" >NUL
GOTO END
:SYNTAX
ECHO INVALID SYNTAX
ECHO CRYPT.CMD
ECHO -------------------------------------------------
ECHO PURPOSE: ENCRYPTS/DECRYPTS the connectionStrings
ECHO section of the Web.Config File for the supplied
ECHO website.
ECHO -------------------------------------------------
ECHO Usage:
ECHO.
ECHO ENCRYPTING THE CONNECTION STRING
ECHO CRYPT /e /WebsiteName
ECHO.
ECHO DECRYPTING THE CONNECTION STRING
ECHO CRYPT /d /WebSiteName
GOTO ENDCLEAN
:END
ECHO Completed..
GOTO ENDCLEAN
:ENDCLEAN
SET TOOL=
-END CRYPT.CMD-
~ CodeDoctor ~
|
|
|
|
|
Hi,
I have a question. I have a gridview in my aspx page. I grabed the data from table. But I want that when I see the aspx page initialy the gridview should be sorted by a column name FirstName in asscending order by default. How can I do that.
Thanks
|
|
|
|
|
In your query that is the data in the table if it is sql you can do
order by FirstName asc
You can also do sorting if you are binding to the datatable directly. Switch to using a DataView and set the sort Property on the dataview.
Something like
DataView dv = yourdataTable.DefaultView;
dv.Sort = "FirstName";
gridview.DataSource = dv;
gridview.DataBind;
Hope that helps.
Ben
|
|
|
|
|
IEI
====
proj_no cst_Amt cst_date cst_typ
Query requirement:
=================
select sum of cst_Amt , month from IEI where cst_typ = 'type1' and proj_no in (select proj_no from IEI where cst_typ = 'type2' and cst_date between '01/01/2006' and '06/01/2006')
===========================================================
select sum(cst_Amt), to_char(cst_date,'MM/01/yyyy') from IEI
where
cst_typ = 'type1' and
proj_no in
(select proj_no
from
IEI where cst_typ = 'type2' and
cst_date between '01/01/2006' and '06/01/2006')
And cst_date between '01/01/2006' and '06/01/2006' group by to_char(cst_date,'MM')
==================
expected output
===============
sum Date
=== ====
212 01/01/2006
434 02/01/2006
434 03/01/2006
434 04/01/2006
434 05/01/2006
434 06/01/2006
|
|
|
|
|
Another idiotic post, well done.
|
|
|
|
|
hi,
I have a web page and it has three textboxes. It has already some text. When I edit the text boxes and click on Edit button the button supposed to epdate the data in the database. But when I debug it the value of textboxes gives me the previous value not the edited value may be in postback it lost it's new value. I set enableviewstate property to True but even then it doesn't work.
Thanks in advance.
hahii
|
|
|
|
|
If you are setting the textbox text in the form load event you need to make sure you have a check on the IsPostBack property. The page load event happens before your edit event, so the data gets set back to its original value in the page load. So you need some code like this:
If (!IsPostBack)
{
textBox.Text = "somevalue";
}
or
If Not IsPostBack Then
textBox.Text = "somevalue
End If
Hope that helps.
Ben
|
|
|
|
|
I have the following code but when I build this it gives me errors that username, userpass, userfname does not exist in current context.
I don't know where is the problem and how can I fix this.
SqlConnection objConn = new SqlConnection("Data Source=sql1300.mssqlservers.com;Initial Catalog=twcsan;Persist Security Info=True;User ID=twcsan;Password=mln0531");
SqlCommand objCmd = new SqlCommand("UPDATE tbUsers SET MyName = @username, " +
"MyPass = @userPass, " +
"UserFName = @userfname, " +
"WHERE UserId = 10", objConn);
objConn.Open();
objCmd.Parameters.AddWithValue(@username1, TextBox1.Text);
objCmd.Parameters.AddWithValue(@userPass, this.TextBox2.Text);
objCmd.Parameters.AddWithValue(@userfname, this.TextBox3.Text);
objCmd.ExecuteNonQuery();
objConn.Close();
Thanks in advance
hahii
|
|
|
|
|
Please try to write a relevant subject. "urgent please help" says nothing about your specific question, and does nothing to distinguish it from all the other questions.
You have forgotten the quotes around the strings.
objCmd.Parameters.AddWithValue("@username1", TextBox1.Text);
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi all,
I have a gridview that has an edit template with a textbox and a dropdown list in it.
At runtime the textbox and dropdown are invisible on the gridview (because they only show in edit view).
When I click "Edit", the textbox and dropdown appear.
I want to be able to reference the dropdown list but when I try to do so, I get the "Object reference not set to an instance of an object." error.
Here is my code:
protected void grdTrak_RowDataBound1(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
((DropDownList)e.Row.FindControl("dlStatus")).Attr ibutes.Add("onSelectedIndexChanged", "enableother(this)");
}
}
Does any one know what the problem could be?
Thank you in advance!
Dave
|
|
|
|
|
The row data bound happens for every row in the gridview. Only one row is set in edit mode, so you can not assume you will find the dropdown in each of the rows as they get data bound.
Hope that helps.
Ben
|
|
|
|
|
Hi guys,
I've been working on a pet project off and on now for a few months; trying to create my own personalized form of AI. Of course, I know a lot of people are against using ASP.NET for larger then standard web applications, but I figured it'd be easier to work with while I mess around.
I'm a fairly new programmer yet, so please bare with me.
The snags I have ran into I have managed for the most part on my own, with a few exceptions. I'm having some difficulty in isolating specific words and or phrases within sentences using regex.
I need to pull these words/phrases from a string and I haven't really managed to make it work quite right yet. I tried using various versions of "(/b)" & string & "(/b)" and I have tried a few others... nothing worked right, and I ended up having to gimp it using a statement to check if (/w) str OR str (/w) exists. That helped narrow things down by making sure i wasn't pulling words like can out of cannot etc but still has obvious issues.
Any suggestions on a regex pattern to isolate a full individual word out of a sentence?
If you're interested in seeing the AI in action, check out www.jeeney.com
Of course, if you have any suggestions in terms of coding or ideas on how to improove things in general, I'm totally open.
Thanks in advance!
|
|
|
|
|
hey guys i am very new to asp.net and i am building a website in which i want to access one "dll" file which contains two functions for image encryption and decryption.but i dn't know how to access those functions.
i want to make call like this
//
function getDecryptimage(strSourcepath:pchar): boolean; stdcall; external 'PSCrypto.dll'
function getEncryptimage(strSourcepath:pchar): boolean; stdcall; external 'PSCrypto.dll';
//
i dn't kow wat procedure to follow and which variables has to be declared for using this function.
is this call correct???
pls help me out guys .
|
|
|
|