|
Trishul Tandel wrote: reply soon
Is that an order?
|
|
|
|
|
Hi friends,
I put single master page with multiple content pages. I call the function from
master page that "showContent()".
MasterPage.Master :
================
function ShowContentOne()
{
alert("enterInside");
var elemContentOne=document.getElementById('divCheckContent');
alert(elemContentOne);
elemContentOne.style.display='block';
elemContentOne.style.visibility='visible';
}
===========================================
this 'divCheckContent' is in content page two. But i cant get it. i call this function onclick in master page.
frmContentOne.aspx :
================
I cant get the div id. The div id is null while i give in alert.
Hope ur's reply
Thanks
__________________
Failing to plan is Planning to fail
Every Successful Person Have A Painful Story
|
|
|
|
|
your idv id is divContentOne and it is ruat server than not acces directly .u use the
<%= divContentOne.ClientID %>
infront of divContentOne in javascript
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Put your javascript function call at end of the page.
i.e just before closing the body tag.
that should work..
Thanks & Regards
Pete
|
|
|
|
|
How to use SqlCacheDependency. Actually i want to implement SqlCacheDependency in my project. So firstly i'm enabling my database by the code given below
aspnet_reqsql.exe -S . -U sa -d 'DatabaseName' -ed
But it raising an error "aspnet_regsql" is not recognised as an internal or external command, operable program or batch file
|
|
|
|
|
.NET- India wrote: aspnet_reqsql.exe -S . -U sa -d 'DatabaseName' -ed
Where are you executing this line from?
Alexei Rodriguez
|
|
|
|
|
In Visual Studio 2005 Command Prompt
|
|
|
|
|
Using the command prompt, Go to:
C:\WINDOWS\Microsoft.NET\Framework\version####\ and execute your statement
I dont know if your statement is correct, but i hope you already checked it
Alexei Rodriguez
|
|
|
|
|
Hi,
I am developing one application in that Registration table i set Email address as primary key and i am using that email address as foreign key for remaining tables.
Now in my application i will put an option Edit Email address. Can we edit the primary key value in all tables?
When i try to edit the primary key Email i am getting this error
"UPDATE statement conflicted with COLUMN FOREIGN KEY constraint 'FK__tbl_perso__Email__01D345B0'. The conflict occurred in database 'spotlend', table 'tbl_registration', column 'Email'".Please tell me how to resolve this problem.
Thanks in Advance
pavani
|
|
|
|
|
pavanip wrote: i am using that email address as foreign key for remaining tables.
If you are useing this as a foreign key, when you try to update or delete that record in registration and there is a record in table 2, then you get this error, you would also need to update or delete the record from table 2 before updating or deleting in table registration
To resolve this, just enable the cascadeupdate and cascadedelete in table registration for the email column
Alexei Rodriguez
|
|
|
|
|
Please be carefull while using cacadedelete on the table.
this may trouble you if you are usiung the trigger. when a record is being deleted.
Thanks & Regards
Pete
|
|
|
|
|
Hi friends
I will be having hardly 100 names in the DB ( My SQL)
I have written a web-service which returns the matching names
Everything is fine except the speed , Please any suggestions regarding increasing speed .
Thanks and Regards
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
cache what you wanna fetch
|
|
|
|
|
Thanks "Phil Uribe" & "J4amieC" for their kind attention on my problem. But I could not get the required result.My problem is still same. By using the following code I got the full path not only file name.
protected void Page_Load(object sender, EventArgs e)
{
string s = "select picture from tiff";
string str = Path.GetFileName(s);
SqlDataAdapter da = new SqlDataAdapter(str, con);
DataSet ds = new DataSet();
da.Fill(ds,"tiff" );
datalistl.DataSource = ds.Tables["tiff"];
datallist.DataBind();
}
Note: I am using datalist and in edit template I used link button to show the file name.
|
|
|
|
|
ahmad25 wrote: Thanks "Phil Uribe" & "J4amieC" for their kind attention on my problem. But I could not get the required result.My problem is still same.
Then you should reply in the already existing thread instead of starting a new.
ahmad25 wrote: string s = "select picture from tiff";
string str = Path.GetFileName(s);
As the string s doesn't contain a file path, using it in a call to GetFileName doesn't give you any meaningful result.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
ahmad25 wrote:
string s = "select picture from tiff";
string str = Path.GetFileName(s);
SqlDataAdapter da = new SqlDataAdapter(str, con);
DataSet ds = new DataSet();
da.Fill(ds,"tiff" );
What is this supposed to return??
You are calling the fill method with "" as you sqlcommand
path.getfilename("c:\\x\myfile.jpg") returns the extension of a file
Alexei Rodriguez
|
|
|
|
|
Hi all,
I am trying create a websetup project for my website. My requirements are
1. I have to check whether SQL Server 2005 is exist in the Client System . If not exist, the setup should terminate.
2.Registration key validation, for that I have to generate a key1 this will be shown in registration form(in label) to user, then user have to enter key2(In a text box). I have to validate the key2 entered by the user.
3. Providing desktop short cut icon. If user clicks on icon, it should open home page of my website.
4. Providing Programs menu shortcut, functionality same as above 2.
5. After copmpletion of installation, i have to show Reade document by providing Button[ReadMeFile] ,if user hits this button i have to open the ReadMe Document.
6. I have move My DataBase files(.ldf &.mdf) to directory [Program Files]\Microsoft SQL Server\MSSQL.1\MSSQL\Data , I have to change the Connection string of my web.config page.
7. I heve to Insert Some values into DataBase table.
8. If any thing fails, i have to roll back/uninstall all files.
Please suggest me how to do websetup for above my requirements.
Thanks in advance.
|
|
|
|
|
Try the Following
I assume that you know to add custom actions for a web setup.
follwing are the answers (Piont wise).
1. Use SQLDMO Namesspase for detecting the sql server. (You can add a form to the Installer for user to speciy the server name, or you can read the system where you are trying to install.)
2. For this step you have to add a action script again and a user interface form.
3. you can use a option of desktop shortcut folder. (Drag the home page. and drop in the desktop shortcut folder.)
4. repeat the step 3. but drop in program shortcut folder.
5. you can user readme dailod. or use a custom action to launch the file either in notepad or word pad.
6. You can convert whole MDF file to a sql script. and Using SQLDMO you can execute the script on the selected instance in step 1.
7. Using SQLDMO run the scripts for inserting the values.
8. rolling back is handled automatically by the installer (But customaction exceptions should be handled carefully).
Thanks & Regards
Pete
|
|
|
|
|
|
Wowwww
It really works!!!
Alexei Rodriguez
|
|
|
|
|
I am trying to setup a site where I connect to an SAAS system via an iframe in my default.asp page. However I seem to be having troubles getting the iframe to pass a variable in the URL.
Here's what I'm trying to do. If I click on the following link, I am immediately logged in as a guest at the SAAS site. Just pasting the link in my browser works correctly.
http://www.mywebapp.com/home/login.asp?FromLogin=1
However, if i use the same URL an iframe, it doesn't seem to pass the variable because I end up at the login page.
<iframe src="<a href="http://www.mywebapp.com/home/login.asp?FromLogin=1">
Can anyone provide a suggestion? This is driving me nuts!
Thanks in advance for your help!
|
|
|
|
|
Hello Everybody .
I am creating a custom control and i am trying to make it raising events
i inherited from IPOSTBackEventHandler interface and implemented its method
but in vain , the control still doesn't have any effect when it is clicked on the page
the code for the control is as follows
<br />
public class CustomButton : Control , IPostBackEventHandler , IPostBackDataHandler<br />
{<br />
public event EventHandler Click;<br />
<br />
protected override void Render(HtmlTextWriter writer)<br />
{<br />
writer.Write("<input type="\"Submit\"" name="\"ClickButton\"" value="\"Click" me="" mode="hold" /> }<br />
<br />
#region IPostBackEventHandler Members<br />
<br />
public void RaisePostBackEvent(string eventArgument)<br />
{<br />
OnClick(new EventArgs());<br />
}<br />
protected virtual void OnClick(EventArgs e)<br />
{<br />
if (Click != null)<br />
Click(this, e);<br />
}<br />
<br />
#endregion<br />
<br />
#region IPostBackDataHandler Members<br />
<br />
public bool LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)<br />
{<br />
Page.RegisterRequiresRaiseEvent(this);<br />
return true;<br />
}<br />
<br />
public void RaisePostDataChangedEvent()<br />
{<br />
<br />
}<br />
<br />
#endregion<br />
}<br />
<br />
What is the problem
Human knowledge belongs to the world.
|
|
|
|
|
Hi All,
Is'nt there a RichTextBox(Like in WinForms)for Asp.Net? What can i use to show some logactions from the database?
Thanx.
|
|
|
|
|
Hi,
I have a web app in asp.net 1.1 . I've created resource files (.resx), and need to add images to it that can then be displayed using the html img tag. How do I load images into .resx files? Should I be loading the image or a path to an image?
Also, I'd like to place all resource files in a sub-directory in the root, and then have them be compiled and placed in a dll in the bin dir. How do I do this? As of now, the only option I see is that I place all the .resx files in the root, and VS will compile them, and place them in a dll in the bin folder. I'd like to see the many .resx files in a dir of their own. How do I do this, and have the vs compiler find them?
Thanks.
Shefali
|
|
|
|
|
I have created a custom gridview control programatically and added checkbox to the template field.below are the steps followed to add the template filed to the gridview
TemplateField tempField = new TemplateField();
tempField.ItemTemplate = new GridViewTemplate(DataControlRowType.DataRow, "TemplateField");
tempField.HeaderTemplate = new GridViewTemplate(DataControlRowType.Header, "TemplateField");
grvGridView.Columns.Add(tempField);
public class GridViewTemplate : System.Web.UI.Page, ITemplate
{
private DataControlRowType fTemplateType;
private string fColumnName;
CheckBox rowCheckBox;CheckBox headerCheckBox = new CheckBox();
public GridViewTemplate(DataControlRowType type, string colname)
{
fTemplateType = type;
fColumnName = colname;
headerCheckBox.ID = "hdrCheckBox";
}
public void InstantiateIn(System.Web.UI.Control container)
{
switch (fTemplateType)
{
case DataControlRowType.Header:
container.Controls.Add(headerCheckBox);
break;
case DataControlRowType.DataRow:
rowCheckBox = new CheckBox();rowCheckBox.ID = "chkUserCheckBox";
container.Controls.Add(rowCheckBox);
break;
}
}
}
once the gridview is bound checkbox is getting rendered perfectly .. but once i select the checkboxes and click button i am unable to locate the checkboxes in the gridview ... getting error(Object Reference not set to an instance) at the lines of code numbered below
CLICK EVENT OF BUTTON
{
foreach(GridViewRow gvr in GridView.Rows)
{
1. CheckBox chkbox = (CheckBox)(gvr.FindControl("chkUserCheckBox")) // First Way tried to get the reference of checkbox
2. CheckBox chkbox = (CheckBox)gvr.Cells[0].Controls[0] // Second Way tried to get the reference of checkbox
}
}
Can anyone please help me resolving the issue .
|
|
|
|