|
Malcolm Smart wrote: f you use this method, make sure you have the ability to reset the column on error. (try /catch / finally). If your
Yes that's correct. No will be able to edit it. Good point
|
|
|
|
|
i create an asp.net website using membership and ..
it works fine on local but when i deploy it to internet this error occures:
--------------------------
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified)
---------------------------
My web config contains this:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=.
\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|
aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
any one can help me ..???
thanks
|
|
|
|
|
ABBASI_RA wrote: <add name="LocalSqlServer" connectionstring="Data Source=.
\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|
aspnetdb.mdf;User Instance=true" providername="System.Data.SqlClient">
I think you can't probably use "." in hosting. You should ask your hosting service about how to connect to your SQL database. We can't say about that for sure since the connectionstring might differ from host to host...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
thanks
i ask it and they dont support sqlexpress
i found its way...
thanks again
|
|
|
|
|
Iam using ASP.Net2.0 with VB.Net.
Iam having a code for validation to the controls which can be called on KEYpress Event i.e. checking for each keypress event related to that control where I have written this code in vbscript.How that function can be called in application or to a control
Can anybody give me the exact syntax to this or help in writing easiest way fro validation of all the controls.
Priya
|
|
|
|
|
txtName.Attribute.Add("onkeypress","yourvbscriptfunction") ?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Priya_2007 wrote: How that function can be called in application or to a control
You have to add attributes to all the controls. Assume you have a textbox with name Text1, then you could add Text1.Attributes.Add("onkeypress","function()") . You should change the event name and calling methods according to VBScript syntax.
Priya_2007 wrote: I have written this code in vbscript.
Why ? Better use javascript. VBScript is supported only in Internet Explorer.
|
|
|
|
|
In which event I have to write the text1.attributes.add("onkeypress","function()")
Parameters of the Function will be valuetype,keyascii of pressed key,text present in the control
How this can be specified
Priya
|
|
|
|
|
Priya_2007 wrote: In which event I have to write the text1.attributes.add("onkeypress","function()")
felicitous place would be Page_Load() .
Priya_2007 wrote: Parameters of the Function will be valuetype,keyascii of pressed key,text present in the control
What is valuetype ? I am not well-known in VBScript. In javascript it can be written like
Text1.Attributes.Add("OnKeyPress","Function(valuetype,event);");
event contains the keyCode which is used to find what is the key pressed.
|
|
|
|
|
Where I have to write the VBScript function either in the Source file or COde File.
Or else can u please suggest where to VBscript file outside and importing of that vbscript file into the project
Priya
|
|
|
|
|
U can use vbscript file in Source
<Script language="VB">
code here
</Script>
Best Regard
Patha
---------------------------------------------------
|
|
|
|
|
code here
THis can be written in the Source file where I have to call the Function present in the Script into code file which may not move to the function present in the Source file.
Priya
|
|
|
|
|
Priya_2007 wrote: Where I have to write the VBScript function either in the Source file or COde File.
you can use in the source file as Pathan suggested
Priya_2007 wrote: uggest where to VBscript file outside and importing of that vbscript file into the project
Sorry no idea on vbscript much
|
|
|
|
|
Hi Can any one help me how to do the paging for DataList in ASP.Net 1.1
Please do help me.
chandu
|
|
|
|
|
|
|
How can i enter a date in other format than Gregorian and upon tab for example change it to its equivillant in Gregorian.
thanks
|
|
|
|
|
u can do it like
DataTime.Now.ToString("MM/dd/yyyy");
|
|
|
|
|
i am having a problem.how to store the cells value stored in a row of a gridview on the click event of row.there is no command argument in the gridview.its just a row.am using JS on click event.please help me out
|
|
|
|
|
lcharan wrote: there is no command argument in the gridview.its just a row.am using JS on click event
Ya there is no event for this since gridview is rendered as plain HTML table. What's the problem you are facing with JS onclick ?
|
|
|
|
|
function fnMoveItems(lstbxFrom,lstbxTo)
{
var varFromBox = document.all(lstbxFrom);
var varToBox = document.all(lstbxTo);
if ((varFromBox != null) && (varToBox != null))
{
if(varFromBox.length < 1)
{
alert('There are no items in the source ListBox');
return false;
}
if(varFromBox.options.selectedIndex == -1)
{
alert('Please select an Item to move');
return false;
}
while ( varFromBox.options.selectedIndex >= 0 )
{
var newOption = new Option();
newOption.text = varFromBox.options[varFromBox.options.selectedIndex].text;
newOption.value = varFromBox.options[varFromBox.options.selectedIndex].value;
varToBox.options[varToBox.length] = newOption;
varFromBox.remove(varFromBox.options.selectedIndex);
}
}
return false;
}
The above is my javascript code to move the values from one listbox to another. Once it move the values , the selected values are deleted from the sourceListbox(ie., left side listbox).
Actually my task is , it never deletes the selected value .
pls give the alternate code for it.
|
|
|
|
|
I have modified your code, you can use it.
function fnMoveItems(lstbxFrom,lstbxTo)
{
//var varFromBox = document.all(lstbxFrom);
//var varToBox = document.all(lstbxTo);
//You can access by list box id like
//var varFromBox = document.getElementById('lstbxFromID');
//var varToBox = document.getElementById('lstbxToID');
if ((varFromBox != null) && (varToBox != null))
{
if(varFromBox.length < 1)
{
alert('There are no items in the source ListBox');
return false;
}
if(varFromBox.options.selectedIndex == -1)
{
alert('Please select an Item to move');
return false;
}
var i;
for(i=varFromBox.options.length-1;i>=0;i--)
{
if(varFromBox.options[i].selected)
{
var optn = document.createElement("OPTION");
optn.text = varFromBox.options[i].text;
optn.value = varFromBox.options[i].value;
lstbxTo.options.add(optn);
varFromBox.remove(i);
}
}
}
return false;
}
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hello !1
actually i wanted to know that how can I display the contents of a text file in asp.net page . I am using vs.net 2003
Mrinal
|
|
|
|
|
Mri1a wrote: i wanted to know that how can I display the contents of a text file in asp.net page
1 - Map your text file using Server.MapPath()
2 - Use StreamReader class to start reading
3 - Assign value to a Label/Literal in ASPX page.
4 - Dispose StreamReader object
|
|
|
|
|
Dont repost.I did give u solution.
declare namespance "System.IO"
try this.It return content of .txt file
File.ReadAllText(Server.MapPath("content.txt"));
Best Regard
Pathan
---------------------------------------------------
|
|
|
|