|
hi,
try this one.
^(([a-zA-Z\d]{3}_){2})([a-zA-Z\d]{3})
It will check for aplhanumeric strings seperated.
Can U give more examples of the type of string you want?
Hope to be of help.
take care
mani
|
|
|
|
|
Do you mean that the first two should end with a digit:
([a-z]{2}\d_){2}[a-z]{3}
or that the first two can contain digits:
([a-z\d]{3}_){2}[a-z]{3}
or that all three can contain digits:
([a-z\d]{3}_){2}[a-z\d]{3}
?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You can search for Regular Expressions here:
Regex Lib[^]
-muneeb
A thing of beauty is the joy forever.
|
|
|
|
|
I don't need to search for a regular expression. You should reply to the original post.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Sorry, I don't want to hurt you. Infact I was replying to the orignal post.
Is there any way to move my post to the orignal post?
-muneeb
A thing of beauty is the joy forever.
|
|
|
|
|
Plz tell me the name of dll which is provided by microsoft
for databaseconnectivity in dotnet
from where i can download that
|
|
|
|
|
nikhil1234 wrote: Plz tell me the name of dll which is provided by microsoft
for databaseconnectivity in dotnet
from where i can download that
Download it from here.Enterprice Library
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
I have a class marked as [Serializable] named "TestClass". When i store the object of this class
Why the [NonSerialized()] attribute fname successfully serialized and deserialized back when i create the object from viewstate?
Following is the full code of my test.
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Runtime.Serialization;
using System.Xml.Serialization;
public partial class viewstate : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TestClass obj = new TestClass();
obj.name = "Dreams";
obj.fname = "Lonely";
ViewState["MyDT"] = obj;
}
protected void Button1_Click(object sender, EventArgs e)
{
TestClass obj = (TestClass)ViewState["MyDT"];
Response.Write("id=" + obj.j.ToString() + " Name=" + obj.name.ToString() + " Age=" + obj.age.ToString() + " fname="+ obj.fname +"");
}
}
[Serializable]
public class TestClass
{
public int j = 1;
public string name = "Dreams";
public string age = "28";
[NonSerialized()]
public string fname = "Planet";
}
Thanks
|
|
|
|
|
Hi,
First you need to Serialize the TestClass object.
Here is how to do it.
Serialization
TestClass obj = new TestClass();
obj.name = "Dreams";
obj.fname = "Lonely";
FileStream fs = new FileStream("SerializedString.Data", FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(fs, obj);
fs.Close();
Then you need to deserialize it like this.
Here is the code for that.
Deserialization
FileStream fs = new FileStream("SerializedString.Data", FileMode.Open);
BinaryFormatter bf = new BinaryFormatter();
TestClass obj= (TestClass)bf.Deserialize(fs);
fs.Close();
Response.Write("id=" + obj.j.ToString() + " Name=" + obj.name.ToString() + " Age=" + obj.age.ToString() + " fname="+ obj.fname +"");
Hope it helped.
Thx,
Gayani
|
|
|
|
|
I agreed.
But storing object into the viewstate is also the process of serialization. If i removed the [Serializable] attribute from TestClass the application won't work, because to store the object, class must have that attribute.
Than why that process won't understand [NonSerialized()] attribute?
Is viewstate serialization is different form of process?
Thanks,
|
|
|
|
|
I have a web project that is only doing put and get over HTTP. The website consists of only HTTP handlers.
When I changed one of my web.config to point at a temporary database, I began getting the Unauthorized exception, with an internal exception that says the server actively rejected my connection.
I'm running VS2008 under Vista SP1. There is no Temp ASP.NET Files folder to delete which others have said is a solution to the problem.
Any suggestions on getting past this??? I've put it back to my current database but I'm still failing. I also compared web.config files with my co-developer and they are identical.
I really need help on this one!
Thanks,
Michael
|
|
|
|
|
Hi, thanks for looking
I have a customcontrol with a public property (UserID)
In my page im binding UserID to gridview.selectedvalue
UserID = '<%# me.gridview.selectedvalue %>'
This custom control is inside a wizard step
When i change between wizardsteps UserID = '<%# me.gridview.selectedvalue %>' disappears from the source of the page
I just noticed that this doesnt happen if i put the customcontrol outside the wizard
Does anyone have any idea of what i can do to bind this property and not loose it if i change wizard steps?
Alexei Rodriguez
|
|
|
|
|
may be a problem with its visibility of the container...
check the exact html what it produces... That may help.
Abhishek Sur
|
|
|
|
|
No, it is really weird
The UserID = '<%# gridview.selectedvalue %>' desappears from the aspx page when i switch between wizard steps, this doesnt happen when the customcontrol is not iside a wizard
It has nothing to do with visivility
Alexei Rodriguez
|
|
|
|
|
hi,
i have one server side textbox control, now i need to assign a value to this control from javascript
i am using like this
document.getElementById('<%=TxtBoxID.ClientID %>')= value;
but it is giving error
if anybody is having any idea abt this i.e assigning a value for server side control from the javascript please let me know.
|
|
|
|
|
you should avoid classic asp style... code. instead do this
<br />
document.getElementById('textboxid').value = requiredvalue;<br />
where textboxid is client id of the the text box. if you do not know it, you can view it in view source code available in the browser..
-----
|
|
|
|
|
I think you are getting the id correctly... please check the Javascript that is produced during the runtime..
To check, just go to View->source. And see if the document.getElementById(<%=TxtBoxID.ClientID %>') with the actual id of the control. If its doing the same, then your code is fine...
Now the error that you made is
document.getElementById('id').value=requiredvalue;
that is you forgot to mention the property of the object where you want to set the value.
this value property should be based on control. if you have used <asp:textbox then="" u="" should="" use="" value.="" xmlns:asp="#unknown">
Thanks
Abhishek Sur
|
|
|
|
|
Your code seema right,But you can do one thing assaign the clientID in newe javascript variable as the same way you did.then pass the variable in document.getElementById().Check viewsource.
Cheers!!
Brij
|
|
|
|
|
Hi All
I need to populate a grid view control in vb.net using a Sql Server 2000 and a basic select sql query.
The interesting part comes from when I need information that is only available on a Oracle database.
Is there any way to populate the control with a single query where I join a sql table with a oracle one?
SqlDataSource1.SelectCommandType = SqlDataSourceCommandType.Text
SqlDataSource1.ConnectionString = System.configuration.ConfigurationManager.ConnectionStrings("REXSConnectionString").ConnectionString
SqlDataSource1.SelectCommand = SqlSelect + SqlWhere + GenerateStatusFilter() + SqlOrderby
GridView1.DataBind()
as you can see the sqlstatement is dynamic, would it be possible to
add a join to the oracle such as
select collist...
from sqltable sql join oracleservername.database.table oracle
on sql.col = oracle.col ?
or any other ideas?
thx
|
|
|
|
|
Member 3895252 wrote: Is there any way to populate the control with a single query where I join a sql table with a oracle one?
What do you think? If there is a way to perform a join query on those two databases don't you think you can use the results as the DataSource for the Grid? So really what is your question? And don't you think you should ask it in the SQL and Database forum?
led mike
|
|
|
|
|
What do you think?
* I don't know, which is why I am asking the question.
If there is a way to perform a join query on those two databases don't you think you can use the results as the DataSource for the Grid?
* Again, I don't know, which is why I am asking the question.
But it's not really a sql database question it's a question on how to populate a gridview question using 2 separate datasources.
It's sort of a mott point which is the best forum to place the question in.
This question could go in several areas,
Since it's database related, maybe in the database forum,
since it's a asp.net web application perhaps the asp.net forum
since I am using vb, perhaps that forum
Since I am using ado and odbc perhaps I should put the questions in those.
Since I am using a computer maybe the hardware forum.
Sheesh,
|
|
|
|
|
Member 3895252 wrote: But it's not really a sql database question
The way you asked it, it is. You asked if you can join the two databases for use in a single query.
Member 3895252 wrote: with a single query
led mike
|
|
|
|
|
You have two options as I see it.
1) Use a DataSet. Create a connection to each Db (oracle and sql server) and use a dataadapter to add the data you need from each database to the same dataset. Then join the DataTable objects by creating a DataRelation object. Then filter the results on one of the tables (Select, Find or use DataView) and then you can use the datarelation to navigate between the tables on a row-by-row basis(OnRowDataBound).
2) From SQL Server create a linked server reference to the Oracle server (there may be a way to to the inverse of this as well, but I've never worked with Oracle so I don't know). See this reference: http://www.sqlmag.com/Article/ArticleID/49687/sql_server_49687.html[^]. Once that's setup, you can query the two databases from a single select statement.
|
|
|
|
|
there is no problem to open more than one databases.
Use Interfaces for command object, Adapters etc, means use
IDBConnection consql=new SQLConnection();
IDBConnection conorcl=new OracleConnection();
Actually that is not required totally, but it is a good practice. Now fill the database tables to the same dataset, and then do joining in Dataset.
and then show the final resultant in the Grid.
Abhishek Sur
|
|
|
|
|
hi everyone,
I've just started working in DNN and I need to open another ascx control in the same module. After some googling I came to know that there r two methods for that
1)NavigateURL
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("showrankedresults"), False)
2) LoadControl Method.
Dim objModule As Entities.Modules.PortalModuleBase = Nothing
objModule = CType(LoadControl("~/DesktopModules/RankedSearch/ShowRankedResult.ascx"), Entities.Modules.PortalModuleBase)
objModule.ModuleConfiguration = ModuleConfiguration
Controls.Add(objModule)
When I run it with the navigateURL, it goes to the next module. but doesn't show anything. I just have a "hi" written in the next module though
When I use the LoadControl method, the control gets loaded under the existing control but that's not what I want. I want it to be loaded as if a new page is loaded,
Please help me in this regard
Thanks in Advance
|
|
|
|