|
hello,
I read an article regarding DataObjectMethod. I can use it like Polymorphism. Just got question and it is what is the diference between
[DataObjectMethod(DataObjectMethodType.Select, false)]
and
[DataObjectMethod(DataObjectMethodType.Select, True)]
thanks
|
|
|
|
|
I don't know. However if I wanted to know, I would read the MSDN documentation, starting here[^].
|
|
|
|
|
Hi,
i have two usercontrols say usrcntrl1.ascx and usrcntrl2.ascx. In usrcntrl2, i have just few links defined. And I want this usrcntrl2 to show up in every page just like header. And now i have usrcntrl1 to call usrcntrl2 on the page_load. How to use nested usercontrols in this case? Is it possible ?
suchita
|
|
|
|
|
My problem is solved already..
suchita
|
|
|
|
|
You could have edited your question and updated it instead of replying to your question. Further, adding the solution might be helpful to others.
|
|
|
|
|
I will correct this from the next time. Thanks a lot.
suchita
|
|
|
|
|
|
I added following code in usrcntrl1.ascx page .
<%@ Register src="usrcntrl2.ascx" tagname="Admin" tagprefix="admin" %>
<asp:PlaceHolder ID = "pHolAdmin" runat="server" visible="true" />
then I wrote following code in usrcntrl1_pageload.
Control cntrl = LoadControl("usrcntrl2.ascx");
cntrl.Visible = true;
pHolAdmin.Controls.Clear();
pHolAdmin.Controls.Add(cntrl);
it worked and problem solved..
suchita
|
|
|
|
|
I have one WebUserControl, in that in have placed one UpdatePanel after that i have placed one Button.
Finally I have placed that UserControl on my new WebForm.
structure -
WebUserControl -> Updatepanel ->Button
and New WebForm->WebUserContol
Now I want to show JavaScript alert window when i m pressing Button from code behind. fot that i have written-
ScriptManager.RegisterStartupScript(this,typeof(this.getType()) ,"ScriptKey","alert('HI')", true);
But it is not working.Plz help me .
Thank's in advance.
|
|
|
|
|
Not sure if you have figured it out yet, but I think the problem is where you register your startup script.
It should point to the page (page where the control is loaded) and not to the control itself.
You can try : ScriptManager.RegisterStartupScript(this.Page,typeof(this.Page.getType()) ,"ScriptKey","alert('HI')", true);
Hope this helps.
|
|
|
|
|
I have been struggling with this all week end ....
I am use Visual Web Developer 2010 Express.
I am trying to implement adding a new record using the Gridview footer.
I have an example that works fine that I got from http://www.aspdotnetcodes.com/GridView_Insert_Edit_Update_Delete.aspx.
My situation is a little different .. as I am using master page and the Gridview is in a page derived from the master page.
I have tried:
Dim txtNewName As TextBox = DirectCast(GridView1.FooterRow.FindControl("NewName"), TextBox)
"NewName" is the ID of one the textbox controls in the footer of the Gridview.
When I try referencing ... txtNewName.Text ... it returns a null value.
There must be some trick to referencing this .Text value when using the Gridview that is within a Content Place Holder that results when using a page that was created using a master page.
Thanks in advance for any possible help with this problem ...
R. Hicks
modified on Sunday, September 19, 2010 9:15 PM
|
|
|
|
|
I ma trying to determine if user is browsing my website from mobile device. I found the IsMobileDevice and tried to use it this way:
<pre>
if (Request.Browser.IsMobileDevice == true)
{
Response.Redirect("http://mobile.JassimRahma.com/");
}
</pre>
but whenI browsed from my Blackberry Curve 8520 it's going to the normail website (full) which means it didn't determine it's a mobile? why? and how can fix this?<pre></pre>
|
|
|
|
|
Try this link..!
http://51degrees.codeplex.com/[^]
http://mdbf.codeplex.com/[^]
jrahma wrote: why?
By default the aspx file take the browser as system in order to specify its a mobile we should install Aspnet_regbrowsers.exe from the below specified folder
Once you install
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regbrowsers.exe
or
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regbrowsers.exe
You will find the browser detection files in
C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers
or
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers
http://msdn.microsoft.com/en-us/library/ms229858(VS.80).aspx[^]
Hope It Helps..!
|
|
|
|
|
Is there a text formatting built in control for ASP or is this something that has to be done manually? I am speaking like maybe something like what you see in this very forum.
|
|
|
|
|
Nothing bundled with Visual Studio, if thta's what you mean. But there are plenty of third-party offerings. Perhaps the best of the free / open-soource ones is TinyMCE[^]
You might have more luck Googling if you try searching for "HTML editor" rather than "text formatting".....
|
|
|
|
|
I can honestly say that you gave the most exact answer that I have ever received on any forum. Don't get me wrong. I usually find what I am looking for through a combination of various answers and google search, but you gave me EXACTLY what I was looking for. Thank you
|
|
|
|
|
Hello,
I am following a sample project from this link: http://www.wewill.cn/n2020c22.aspx
in ConcatPerson impelementation, go to this part,please
public static int Save(ContactPerson myContactPerson)
then in that method they use foreach loop.
int contactPersonId = ContactPersonDB.Save(myContactPerson);
foreach (Address myAddress in myContactPerson.Addresses)
{
myAddress.ContactPersonId = contactPersonId;
AddressDB.Save(myAddress);
}
I don't understand the above code?why he use loop?Could you please some one explain more.
thanks for helping me in this matter.
|
|
|
|
|
AFACT without reading the whole article, the Save operation returns the contactPerson object's ID [probably] generated by the SQL Server.
The loop sets the "backward" reference ID from the Address object to the "owning" ContactPerson object.
|
|
|
|
|
Hi guys
I have a sample Code and misunderestanding with one parameter.however it may seems stpd question for you professional guys.
public DataObjectFieldAttribute(
bool primaryKey,
bool isIdentity)
<br />
primaryKey<br />
Type: System.Boolean<br />
true to indicate that the field is in the primary key of the data row; otherwise, false.<br />
isIdentity<br />
Type: System.Boolean<br />
true to indicate that the field is an identity field that uniquely identifies the data row; otherwise, false.<br />
the question is what is the meaning of isIdentity here?
|
|
|
|
|
Perhaps it referres to a identity column in SQL Server
Look Here[^]
for identity column
|
|
|
|
|
Look right under isIdentity
future3839 wrote: Type: System.Boolean true to indicate that the field is an identity field that uniquely identifies the data row; otherwise, false.
Isn't that clear to you? In your data row, Is this field identity field? What is Identity Filed, see here[^]
|
|
|
|
|
Hi guys
I have a sample Code and misunderestanding with one parameter.however it may seems stpd question for you professional guys.
public DataObjectFieldAttribute(
bool primaryKey,
bool isIdentity)
<br />
primaryKey<br />
Type: System.Boolean<br />
true to indicate that the field is in the primary key of the data row; otherwise, false.<br />
isIdentity<br />
Type: System.Boolean<br />
true to indicate that the field is an identity field that uniquely identifies the data row; otherwise, false.<br />
the question is what is the meaning of isIdentity here?
|
|
|
|
|
Dont repost your question
|
|
|
|
|
Hi,
I am using this connection string to query some .DBF .
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\Dbfs;
If i don't run the application on IIS it works well. If i run it on IIS (7.5) i get this
OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
How can i make it work?
Thanks.
|
|
|
|
|
Hi,
Do you have ODBC DSN created in your system where you have hosted the site ?
|
|
|
|